diff options
Diffstat (limited to 'dcae-controller-service/dcae-controller-service-standardeventcollector')
9 files changed, 513 insertions, 508 deletions
diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProvider.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProvider.java index 246fdca..0e5f16c 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProvider.java +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/manager/DcaeControllerServiceStandardeventcollectorManagerProvider.java @@ -9,7 +9,7 @@ * 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 + * 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, @@ -18,7 +18,7 @@ * limitations under the License. * ============LICENSE_END============================================ */ - + package org.openecomp.dcae.controller.service.standardeventcollector.servers.manager; @@ -57,465 +57,464 @@ import org.openecomp.dcae.controller.core.service.impl.ServiceFactoryImpl; public class DcaeControllerServiceStandardeventcollectorManagerProvider extends DcaeDockerManagerProvider { - private static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorManagerProvider.class); - ControllerServiceStandardeventcollectorManager o; - + private static final Logger logger = Logger.getLogger(DcaeControllerServiceStandardeventcollectorManagerProvider.class); + ControllerServiceStandardeventcollectorManager o; - private static final String DMAAP_CONFIG = "/etc/dcae/dmaap.conf"; - private static final String HP_MAIN_CONFIG = "/opt/app/VESCollector/etc/DmaapConfig.json"; + private static final String DMAAP_CONFIG = "/etc/dcae/dmaap.conf"; + private static final String HP_MAIN_CONFIG = "/opt/app/VESCollector/etc/DmaapConfig.json"; + - public DcaeControllerServiceStandardeventcollectorManagerProvider(ISiriusServer controller, ControllerServiceStandardeventcollectorManager o) { - super(controller, o); - this.o = o; - } + public DcaeControllerServiceStandardeventcollectorManagerProvider(ISiriusServer controller, ControllerServiceStandardeventcollectorManager o) { + super(controller, o); + this.o = o; + } private void executeCommand(String cmd) { // TODO Auto-generated method stub - Runtime run = Runtime.getRuntime(); - Process pr; - try { - pr = run.exec(cmd); - pr.waitFor(); - BufferedReader buf = new BufferedReader(new InputStreamReader(pr.getInputStream())); - String line = ""; - while ((line = buf.readLine()) != null) { - System.out.println("line is " +line); - System.out.println("updated the config successfully"); - } - } catch (IOException | InterruptedException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + Runtime run = Runtime.getRuntime(); + Process pr; + try { + pr = run.exec(cmd); + pr.waitFor(); + BufferedReader buf = new BufferedReader(new InputStreamReader(pr.getInputStream())); + String line = ""; + while ((line = buf.readLine()) != null) { + System.out.println("line is " +line); + System.out.println("updated the config successfully"); + } + } catch (IOException | InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } } - /** **/ - @Override - public HealthTestResponse test() { - super.start(); - HealthTestResponse resp = new ServiceFactoryImpl().createHealthTestResponse(); - String cmdOutput = ""; - try { - ShellCmd c = new ShellCmd("/opt/app/VESCollector/bin/VESrestfulCollector_Status.sh"); - String s = c.result(60000); - int i = s.indexOf("\n"); - System.out.println("DEBUG:HealthTestResponse i:" + i + " String S:" + s); - cmdOutput = i > 0 ? s.substring(0,i + 1) : s; - } catch (IOException | InterruptedException | TimeoutException e) { - System.out.println("HealthCheck test execution FAILED"); - // TODO Auto-generated catch block - e.printStackTrace(); - } - - System.out.println("test() VESCollecter check " + cmdOutput); - if (cmdOutput.startsWith("VESCollecter_Is_Running ")) { - resp.setStatus(HealthTestStatus.GREEN); - resp.setMessageCode("OK"); - logger.error("HealthTest: VESCollecter_Is_Running"); - System.out.println("INFO: HealthTest: VESCollecter_Is_Running"); - } else if (cmdOutput.startsWith("VESCollecter_Is_HavingError")) { - resp.setStatus(HealthTestStatus.YELLOW); - resp.setMessageCode("ERROR: VESCollecter_Is_HavingError"); - logger.error("HealthTest: VESCollecter_Is_HavingError"); - System.out.println("ERROR: HealthTest: VESCollecter_Is_HavingError"); - } else { - resp.setStatus(HealthTestStatus.RED); - resp.setMessageCode("ERROR: VESCollecter_Is_Not_Running"); - logger.error("HealthTest: VESCollecter_Is_Not_Running"); - System.out.println("ERROR: HealthTest: VESCollecter_Is_Not_Running"); - } - - return resp; - } + /** **/ + @Override + public HealthTestResponse test() { + super.start(); + HealthTestResponse resp = new ServiceFactoryImpl().createHealthTestResponse(); + String cmdOutput = ""; + try { + ShellCmd c = new ShellCmd("/opt/app/VESCollector/bin/VESrestfulCollector_Status.sh"); + String s = c.result(60000); + int i = s.indexOf("\n"); + System.out.println("DEBUG:HealthTestResponse i:" + i + " String S:" + s); + cmdOutput = i > 0 ? s.substring(0,i + 1) : s; + } catch (IOException | InterruptedException | TimeoutException e) { + System.out.println("HealthCheck test execution FAILED"); + // TODO Auto-generated catch block + e.printStackTrace(); + } + + System.out.println("test() VESCollecter check " + cmdOutput); + if (cmdOutput.startsWith("VESCollecter_Is_Running ")) { + resp.setStatus(HealthTestStatus.GREEN); + resp.setMessageCode("OK"); + logger.error("HealthTest: VESCollecter_Is_Running"); + System.out.println("INFO: HealthTest: VESCollecter_Is_Running"); + } else if (cmdOutput.startsWith("VESCollecter_Is_HavingError")) { + resp.setStatus(HealthTestStatus.YELLOW); + resp.setMessageCode("ERROR: VESCollecter_Is_HavingError"); + logger.error("HealthTest: VESCollecter_Is_HavingError"); + System.out.println("ERROR: HealthTest: VESCollecter_Is_HavingError"); + } else { + resp.setStatus(HealthTestStatus.RED); + resp.setMessageCode("ERROR: VESCollecter_Is_Not_Running"); + logger.error("HealthTest: VESCollecter_Is_Not_Running"); + System.out.println("ERROR: HealthTest: VESCollecter_Is_Not_Running"); + } + + return resp; + } @Override public void configurationChanged() { - // important to call the super methods for handling DMaaP setup. - super.configurationChanged(); - - try { - //Added to avoid timing issues and ensure dmaap.conf is updated - // by the call to super.configurationChanges before checking contents into it. - Thread.sleep(3000); - } catch (InterruptedException e) { - e.printStackTrace(); - System.out.println ("Sleep time expired"); - } - JSONArray charray = retrieveDmaapSetting(); - //System.out.println("Modified HPchannel config:" + charray); - logger.info("Modified HPchannel config: " + charray); - - JSONObject channelconfig = new JSONObject(); - channelconfig.put("channels", charray); - updateJsonToHPConfig (HP_MAIN_CONFIG, HP_MAIN_CONFIG,charray); - - //For debug purpose - //writeJsonToFile(HP_CH_CONFIG, channelconfig); - //updateJsonToHPConfig (HP_MAIN_CONFIG, HP_MAIN_CONFIG_COPY,charray); - - - //Collector port - String cport = o.getCport(); - if (cport !=null) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.service.port" +" "+ cport; - executeCommand(cmd); - } - - //Collector csecport - String csecport = o.getCsecport(); - if (csecport !=null) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.service.secure.port" +" "+ csecport; - executeCommand(cmd); - } - - //Collector keystoreloc - String keystoreloc = o.getKeystoreloc(); - if (keystoreloc !=null) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.keystore.file.location" +" "+ keystoreloc; - executeCommand(cmd); - } - - //Collector keystorepwdfile - String keystorepwdfile = o.getKeystorepwdloc(); - if (keystorepwdfile !=null) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.keystore.passwordfile" +" "+ keystorepwdfile; - executeCommand(cmd); - } - - //Collector keystorealias - String keystorealias = o.getKeystorealias(); - if (keystorealias !=null) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.keystore.alias" +" "+ keystorealias; - executeCommand(cmd); - } - //Collector maxinputqueue - String maxinputqueue = o.getCport(); - if (maxinputqueue !=null) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.inputQueue.maxPending" +" "+ maxinputqueue; - executeCommand(cmd); - } - - //checkschemaflag - String checkschemaflag = o.getCheckschemaflag(); - if (checkschemaflag != null && !checkschemaflag.equals("")) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.schema.checkflag" +" "+ checkschemaflag; - executeCommand(cmd); - - } else { - System.out.println("Schemaflag is null"); - } - - //authflag - String authflag = o.getAuthflag(); - if (authflag != null && !authflag.equals("")) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "header.authflag" +" "+ authflag; - executeCommand(cmd); - - } else { - System.out.println("authlist is null"); - } - - //authlist - replaces authid/pwd - String authlist = o.getAuthlist(); - if (authlist != null && !authlist.equals("")) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "header.authlist" +" "+ authlist; - executeCommand(cmd); - - } else { - System.out.println("authlist is null"); - } - - //StreamID - String streamid = o.getStreamid(); - if (streamid != null && !streamid.equals("")) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.dmaap.streamid" +" "+ streamid; - executeCommand(cmd); - } else { - System.out.println("streamid is null"); - } - - // schemafile - String schemafile = o.getSchemafile(); - if (schemafile != null && !schemafile.equals("")) { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "collector.schema.file" +" "+ schemafile; - executeCommand(cmd); - - } else { - System.out.println("Schemafile is null"); - } - - resume(); + // important to call the super methods for handling DMaaP setup. + super.configurationChanged(); + + try { + //Added to avoid timing issues and ensure dmaap.conf is updated + // by the call to super.configurationChanges before checking contents into it. + Thread.sleep(3000); + } catch (InterruptedException e) { + e.printStackTrace(); + System.out.println ("Sleep time expired"); + } + JSONArray charray = retrieveDmaapSetting(); + //System.out.println("Modified HPchannel config:" + charray); + logger.info("Modified HPchannel config: " + charray); + + JSONObject channelconfig = new JSONObject(); + channelconfig.put("channels", charray); + updateJsonToHPConfig (HP_MAIN_CONFIG, HP_MAIN_CONFIG,charray); + + //For debug purpose + //writeJsonToFile(HP_CH_CONFIG, channelconfig); + //updateJsonToHPConfig (HP_MAIN_CONFIG, HP_MAIN_CONFIG_COPY,charray); + + + //Collector port + String cport = o.getCport(); + if (cport !=null) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.service.port" +" "+ cport; + executeCommand(cmd); + } + + //Collector csecport + String csecport = o.getCsecport(); + if (csecport !=null) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.service.secure.port" +" "+ csecport; + executeCommand(cmd); + } + + //Collector keystoreloc + String keystoreloc = o.getKeystoreloc(); + if (keystoreloc !=null) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.keystore.file.location" +" "+ keystoreloc; + executeCommand(cmd); + } + + //Collector keystorepwdfile + String keystorepwdfile = o.getKeystorepwdloc(); + if (keystorepwdfile !=null) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.keystore.passwordfile" +" "+ keystorepwdfile; + executeCommand(cmd); + } + + //Collector keystorealias + String keystorealias = o.getKeystorealias(); + if (keystorealias !=null) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.keystore.alias" +" "+ keystorealias; + executeCommand(cmd); + } + //Collector maxinputqueue + String maxinputqueue = o.getCport(); + if (maxinputqueue !=null) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.inputQueue.maxPending" +" "+ maxinputqueue; + executeCommand(cmd); + } + + //checkschemaflag + String checkschemaflag = o.getCheckschemaflag(); + if (checkschemaflag != null && !checkschemaflag.equals("")) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.schema.checkflag" +" "+ checkschemaflag; + executeCommand(cmd); + + } else { + System.out.println("Schemaflag is null"); + } + + //authflag + String authflag = o.getAuthflag(); + if (authflag != null && !authflag.equals("")) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "header.authflag" +" "+ authflag; + executeCommand(cmd); + + } else { + System.out.println("authlist is null"); + } + + //authlist - replaces authid/pwd + String authlist = o.getAuthlist(); + if (authlist != null && !authlist.equals("")) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "header.authlist" +" "+ authlist; + executeCommand(cmd); + + } else { + System.out.println("authlist is null"); + } + + //StreamID + String streamid = o.getStreamid(); + if (streamid != null && !streamid.equals("")) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.dmaap.streamid" +" "+ streamid; + executeCommand(cmd); + } else { + System.out.println("streamid is null"); + } + + // schemafile + String schemafile = o.getSchemafile(); + if (schemafile != null && !schemafile.equals("")) { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "collector.schema.file" +" "+ schemafile; + executeCommand(cmd); + + } else { + System.out.println("Schemafile is null"); + } + + resume(); } - + private JSONArray retrieveDmaapSetting() { - String fileName = DMAAP_CONFIG; + String fileName = DMAAP_CONFIG; - File f = new File(fileName); + File f = new File(fileName); - if (!f.exists() || !f.canRead() || f.isDirectory()) { - System.out.println("faile to open file: [" + fileName + "]"); - return null; - } + if (!f.exists() || !f.canRead() || f.isDirectory()) { + System.out.println("faile to open file: [" + fileName + "]"); + return null; + } - String jsonData = readFile(fileName); - JSONArray charray = new JSONArray(); - try { - JSONObject jobj = verifyJSON(jsonData); - JSONArray jarray = jobj.getJSONArray("dmaaps"); + String jsonData = readFile(fileName); + JSONArray charray = new JSONArray(); + try { + JSONObject jobj = verifyJSON(jsonData); + JSONArray jarray = jobj.getJSONArray("dmaaps"); - for (int i = 0; i < jarray.length(); i++) { - JSONObject tmpobj = jarray.getJSONObject(i); - System.out.println("tempobj:" + tmpobj); - JSONObject hpC = buildHpChannel(tmpobj); - charray.put(hpC); - } - } catch (Exception e) { - logger.warn("Failed_To_Get_DMaaP_Configuation: " + e); - } + for (int i = 0; i < jarray.length(); i++) { + JSONObject tmpobj = jarray.getJSONObject(i); + System.out.println("tempobj:" + tmpobj); + JSONObject hpC = buildHpChannel(tmpobj); + charray.put(hpC); + } + } catch (Exception e) { + logger.warn("Failed_To_Get_DMaaP_Configuation: " + e); + } - return charray; + return charray; } private String readFile(String fileName) { - String result = ""; - BufferedReader br = null; - try { - br = new BufferedReader(new FileReader(fileName)); - StringBuilder sb = new StringBuilder(); - String line = br.readLine(); - while (line != null) { - sb.append(line); - line = br.readLine(); - } - result = "{ \"dmaaps\":" + sb.toString() + "}"; - } catch (Exception e) { - System.out.println("Failed to read file: [" + fileName + "]"); - logger.warn("Failed_To_Get_DMaaP_Configuation from file [" + fileName + "]" + e); - e.printStackTrace(); - } finally { - if (null != br) { - try { - br.close(); - } catch (Exception e) { - logger.warn("readFile().BufferedReader cannot be closed"); - } - } - } - return result; + String result = ""; + BufferedReader br = null; + try { + br = new BufferedReader(new FileReader(fileName)); + StringBuilder sb = new StringBuilder(); + String line = br.readLine(); + while (line != null) { + sb.append(line); + line = br.readLine(); + } + result = "{ \"dmaaps\":" + sb.toString() + "}"; + } catch (Exception e) { + System.out.println("Failed to read file: [" + fileName + "]"); + logger.warn("Failed_To_Get_DMaaP_Configuation from file [" + fileName + "]" + e); + e.printStackTrace(); + } finally { + if (null != br) { + try { + br.close(); + } catch (Exception e) { + logger.warn("readFile().BufferedReader cannot be closed"); + } + } + } + return result; } private JSONObject verifyJSON(String data) { - JSONObject temp; - try { - temp = new JSONObject(data); - } catch (Exception e) { - temp = null; - e.printStackTrace(); - } - return temp; + JSONObject temp; + try { + temp = new JSONObject(data); + } catch (Exception e) { + temp = null; + e.printStackTrace(); + } + return temp; } private JSONObject buildHpChannel(JSONObject tmpObj) { - - JSONObject hpC = new JSONObject(); - String hpName; - String mrType = null; // UEB: in|out DMaaP: subscribe|publish - String mrClass = "HpCambriaOutputStream";// getDmaapClass(); - String mrUrl = null; - String sType = "HTTPS"; - String mrTopic = ""; - String hpGroup = ""; - String hpInstance = "0"; - String basicUname = null; // UEB apiKey, DMaaP: dmaapUserName - String basicPwd = null; // DMaaP: dmaapPassword - String dmaapDataType = "message"; - - mrUrl = tmpObj.getString("dmaapUrl"); - String[] urlParts = dmaapUrlSplit(mrUrl); - - mrType = tmpObj.getString("dmaapAction"); - if (mrType.equals("publish")) { - mrType = "out"; - } else { - mrType = "in"; - mrClass = "HpCambriaInputStream";// getDmaapClass(); - } - - hpName = tmpObj.getString("dmaapStreamId"); - hpC.put("name", hpName); - hpC.put("type", mrType); - hpC.put("class", mrClass); - - if (tmpObj.has("dmaapUserName") && tmpObj.has("dmaapPassword") ) - { - basicPwd = tmpObj.getString("dmaapPassword"); - basicUname = tmpObj.getString("dmaapUserName"); - if (basicUname != null && !basicUname.equals("")) - { - if (basicPwd != null && !basicPwd.equals("")) - { - hpC.put("basicAuthUsername", basicUname); - hpC.put("basicAuthPassword", basicPwd); - hpC.put("cambria.connectionType", sType); - } - } - - } - - String dataTypeTmp = tmpObj.getString("dmaapDataType"); - if (!dmaapDataType.equals(dataTypeTmp)) { - System.out.println("Invalid DataType (non message) recieved" + dataTypeTmp ); - logger.warn("Invalid DataType (non message) recieved" + dataTypeTmp); - } - if (null != urlParts) { - mrUrl = urlParts[2]; - - //DCAE internal dmaap topic convention - if (urlParts[3].equals("events")) - { - mrTopic = urlParts[4]; - hpC.put("cambria.url", mrUrl); - - } - else { - //ONAP dmaap topic convention - mrTopic = urlParts[3]; - String[] hostport = mrUrl.split(":"); - hpC.put("cambria.hosts", hostport[0]); - } - - if (mrType.equals("subscribe") || mrType.equals("in")) { - if (urlParts.length > 4) { - hpGroup = urlParts[5]; - } - if (urlParts.length > 4) { - hpInstance = urlParts[6]; - } - } - } - - hpC.put("cambria.topic", mrTopic); - - if (mrType.equals("out")) { - hpC.put("stripHpId", "true"); - } else { - hpC.put("cambria.group", hpGroup); - hpC.put("cambria.instance", hpInstance); - } - - return hpC; + + JSONObject hpC = new JSONObject(); + String hpName; + String mrType = null; // UEB: in|out DMaaP: subscribe|publish + String mrClass = "HpCambriaOutputStream";// getDmaapClass(); + String mrUrl = null; + String sType = "HTTPS"; + String mrTopic = ""; + String hpGroup = ""; + String hpInstance = "0"; + String basicUname = null; // UEB apiKey, DMaaP: dmaapUserName + String basicPwd = null; // DMaaP: dmaapPassword + String dmaapDataType = "message"; + + mrUrl = tmpObj.getString("dmaapUrl"); + String[] urlParts = dmaapUrlSplit(mrUrl); + + mrType = tmpObj.getString("dmaapAction"); + if (mrType.equals("publish")) { + mrType = "out"; + } else { + mrType = "in"; + mrClass = "HpCambriaInputStream";// getDmaapClass(); + } + + hpName = tmpObj.getString("dmaapStreamId"); + hpC.put("name", hpName); + hpC.put("type", mrType); + hpC.put("class", mrClass); + + if (tmpObj.has("dmaapUserName") && tmpObj.has("dmaapPassword") ) + { + basicPwd = tmpObj.getString("dmaapPassword"); + basicUname = tmpObj.getString("dmaapUserName"); + if (basicUname != null && !basicUname.equals("")) + { + if (basicPwd != null && !basicPwd.equals("")) + { + hpC.put("basicAuthUsername", basicUname); + hpC.put("basicAuthPassword", basicPwd); + hpC.put("cambria.connectionType", sType); + } + } + + } + + String dataTypeTmp = tmpObj.getString("dmaapDataType"); + if (!dmaapDataType.equals(dataTypeTmp)) { + System.out.println("Invalid DataType (non message) recieved" + dataTypeTmp ); + logger.warn("Invalid DataType (non message) recieved" + dataTypeTmp); + } + if (null != urlParts) { + mrUrl = urlParts[2]; + + //DCAE internal dmaap topic convention + if (urlParts[3].equals("events")) + { + mrTopic = urlParts[4]; + hpC.put("cambria.url", mrUrl); + + } + else { + //ONAP dmaap topic convention + mrTopic = urlParts[3]; + String[] hostport = mrUrl.split(":"); + hpC.put("cambria.hosts", hostport[0]); + } + + if (mrType.equals("subscribe") || mrType.equals("in")) { + if (urlParts.length > 4) { + hpGroup = urlParts[5]; + } + if (urlParts.length > 4) { + hpInstance = urlParts[6]; + } + } + } + + hpC.put("cambria.topic", mrTopic); + + if (mrType.equals("out")) { + hpC.put("stripHpId", "true"); + } else { + hpC.put("cambria.group", hpGroup); + hpC.put("cambria.instance", hpInstance); + } + + return hpC; } private static void writeJsonToFile(String fileName, JSONObject obj) { - FileWriter file = null; - try { - - file = new FileWriter(fileName); - file.write(obj.toString(4)); - } catch (Exception e) { - System.out.println(" FileWriter Error: " + e); - } finally { - if (file != null) - try { - file.close(); - } catch (Exception fe) { - } - } + FileWriter file = null; + try { + + file = new FileWriter(fileName); + file.write(obj.toString(4)); + } catch (Exception e) { + System.out.println(" FileWriter Error: " + e); + } finally { + if (file != null) + try { + file.close(); + } catch (Exception fe) { + } + } } /*** - * Dmaap url structure + * Dmaap url structure * pub - https://<dmaaphostname>:<port>/events/<namespace>.<dmaapcluster>.<topic>, * sub - https://<dmaaphostname>:<port>/events/<namespace>.<dmaapcluster>.<topic>/G1/u1"; - * + * * Onap url structure * pub - http://<dmaaphostname>:<port>/<unauthenticated>.<topic>, */ private String[] dmaapUrlSplit(String dmUrl) { - String[] multUrls = dmUrl.split(","); - - StringBuffer newUrls = new StringBuffer(); - String urlParts[] = null; - for (int i = 0; i < multUrls.length; i++) { - urlParts = multUrls[i].split("/"); - if (i == 0) { - newUrls = newUrls.append(urlParts[2]); - } else { - newUrls = newUrls.append(",").append(urlParts[2]); - } - } - return urlParts; + String[] multUrls = dmUrl.split(","); + + StringBuffer newUrls = new StringBuffer(); + String urlParts[] = null; + for (int i = 0; i < multUrls.length; i++) { + urlParts = multUrls[i].split("/"); + if (i == 0) { + newUrls = newUrls.append(urlParts[2]); + } else { + newUrls = newUrls.append(",").append(urlParts[2]); + } + } + return urlParts; } private void updateJsonToHPConfig(String sourceName,String targetfile, JSONArray obj) { - String jsonData = readFile(sourceName); - JSONObject jobj = verifyJSON(jsonData); - JSONObject job = jobj.getJSONObject("dmaaps"); - - - - job.remove("channels"); - job.put("channels", obj); - writeJsonToFile(targetfile, job); - + String jsonData = readFile(sourceName); + JSONObject jobj = verifyJSON(jsonData); + JSONObject job = jobj.getJSONObject("dmaaps"); + + + + job.remove("channels"); + job.put("channels", obj); + writeJsonToFile(targetfile, job); + } + + + - - - - @Override - public void start() { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "ADMIN" +" "+ "start"; + @Override + public void start() { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "ADMIN" +" "+ "start"; executeCommand(cmd); - // TODO IMPLEMENT - // throw new UnsupportedOperationException(); - } - - @Override - public void suspend() { - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "ADMIN" +" "+ "stop"; - executeCommand(cmd); - } - - @Override - public void resume() { - - String cmd=""; - cmd = "bin/VES_controller_update.sh " + "ADMIN" +" "+ "stop"; - executeCommand(cmd); - - cmd=""; - cmd = "bin/VES_controller_update.sh " + "ADMIN" +" "+ "start"; + // TODO IMPLEMENT + // throw new UnsupportedOperationException(); + } + + @Override + public void suspend() { + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "ADMIN" +" "+ "stop"; + executeCommand(cmd); + } + + @Override + public void resume() { + + String cmd=""; + cmd = "bin/VES_controller_update.sh " + "ADMIN" +" "+ "stop"; + executeCommand(cmd); + + cmd=""; + cmd = "bin/VES_controller_update.sh " + "ADMIN" +" "+ "start"; executeCommand(cmd); // TODO IMPLEMENT - // throw new UnsupportedOperationException(); - } - + // throw new UnsupportedOperationException(); + } + } - diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProvider.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProvider.java index 1f1098a..f202570 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProvider.java +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-manager/src/main/java/org/openecomp/dcae/controller/service/standardeventcollector/servers/service/DcaeControllerServiceStandardeventcollectorServiceProvider.java @@ -45,6 +45,7 @@ import org.openecomp.dcae.controller.service.standardeventcollector.manager.Cont import org.openecomp.dcae.controller.service.standardeventcollector.manager.ManagerFactory; import org.openecomp.dcae.controller.service.standardeventcollector.service.impl.ControllerServiceStandardeventcollectorServiceImpl; import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorService; +import org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceInstance; public class DcaeControllerServiceStandardeventcollectorServiceProvider extends DcaeDockerServiceProvider { @@ -59,13 +60,10 @@ public class DcaeControllerServiceStandardeventcollectorServiceProvider extends @Override public EObject managerConfiguration(String instanceName) { ControllerServiceStandardeventcollectorManager o1 = ManagerFactory.eINSTANCE.createControllerServiceStandardeventcollectorManager(); - ManagementServer.copy(findInstance(instanceName),o1); + ControllerServiceStandardeventcollectorServiceInstance o2 = (ControllerServiceStandardeventcollectorServiceInstance) findInstance(instanceName); + ManagementServer.copy(o2,o1); o1.setAuthlist(JavaHttpClient.decryptEmbeddedPassword(o1.getAuthlist())); return o1; } - - - - } diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ControllerServiceStandardeventcollectorManagerImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ControllerServiceStandardeventcollectorManagerImpl.java index 10c02e8..23f5b1f 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ControllerServiceStandardeventcollectorManagerImpl.java +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/manager/impl/ControllerServiceStandardeventcollectorManagerImpl.java @@ -426,6 +426,27 @@ public class ControllerServiceStandardeventcollectorManagerImpl extends DockerMa * <!-- end-user-doc --> * @generated */ + public String getAuthlist() { + return authlist; + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ + public void setAuthlist(String newAuthlist) { + String oldAuthlist = authlist; + authlist = newAuthlist; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, ManagerPackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_MANAGER__AUTHLIST, oldAuthlist, authlist)); + } + + /** + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @generated + */ public String getCheckschemaflag() { return checkschemaflag; } @@ -709,18 +730,6 @@ public class ControllerServiceStandardeventcollectorManagerImpl extends DockerMa return result.toString(); } - @Override - public String getAuthlist() { - // TODO Auto-generated method stub - return null; - } - - @Override - public void setAuthlist(String value) { - // TODO Auto-generated method stub - - } - /** * <!-- begin-user-doc --> * <!-- end-user-doc --> diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceConfiguration.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceConfiguration.java index c664ea6..1ca05a3 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceConfiguration.java +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ControllerServiceStandardeventcollectorServiceConfiguration.java @@ -243,6 +243,33 @@ public interface ControllerServiceStandardeventcollectorServiceConfiguration ext void setAuthflag(String value); /** + * Returns the value of the '<em><b>Authlist</b></em>' attribute. + * <!-- begin-user-doc --> + * <p> + * If the meaning of the '<em>Authlist</em>' attribute isn't clear, + * there really should be more of a description here... + * </p> + * <!-- end-user-doc --> + * @return the value of the '<em>Authlist</em>' attribute. + * @see #setAuthlist(String) + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Authlist() + * @model unique="false" + * annotation="http://openecomp.org type='configuration'" + * @generated + */ + String getAuthlist(); + + /** + * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthlist <em>Authlist</em>}' attribute. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @param value the new value of the '<em>Authlist</em>' attribute. + * @see #getAuthlist() + * @generated + */ + void setAuthlist(String value); + + /** * Returns the value of the '<em><b>Checkschemaflag</b></em>' attribute. * <!-- begin-user-doc --> * <p> @@ -297,33 +324,6 @@ public interface ControllerServiceStandardeventcollectorServiceConfiguration ext void setSchemafile(String value); /** - * Returns the value of the '<em><b>Authlist</b></em>' attribute. - * <!-- begin-user-doc --> - * <p> - * If the meaning of the '<em>Authlist</em>' attribute isn't clear, - * there really should be more of a description here... - * </p> - * <!-- end-user-doc --> - * @return the value of the '<em>Authlist</em>' attribute. - * @see #setAuthlist(String) - * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ServicePackage#getControllerServiceStandardeventcollectorServiceConfiguration_Authlist() - * @model unique="false" - * annotation="http://openecomp.org type='configuration'" - * @generated - */ - String getAuthlist(); - - /** - * Sets the value of the '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthlist <em>Authlist</em>}' attribute. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @param value the new value of the '<em>Authlist</em>' attribute. - * @see #getAuthlist() - * @generated - */ - void setAuthlist(String value); - - /** * Returns the value of the '<em><b>Streamid</b></em>' attribute. * <!-- begin-user-doc --> * <p> diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServicePackage.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServicePackage.java index f5bf0fa..7078d6d 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServicePackage.java +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/ServicePackage.java @@ -822,6 +822,17 @@ public interface ServicePackage extends EPackage { EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authflag(); /** + * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthlist <em>Authlist</em>}'. + * <!-- begin-user-doc --> + * <!-- end-user-doc --> + * @return the meta object for the attribute '<em>Authlist</em>'. + * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthlist() + * @see #getControllerServiceStandardeventcollectorServiceConfiguration() + * @generated + */ + EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authlist(); + + /** * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getCheckschemaflag <em>Checkschemaflag</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -844,17 +855,6 @@ public interface ServicePackage extends EPackage { EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile(); /** - * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthlist <em>Authlist</em>}'. - * <!-- begin-user-doc --> - * <!-- end-user-doc --> - * @return the meta object for the attribute '<em>Authlist</em>'. - * @see org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getAuthlist() - * @see #getControllerServiceStandardeventcollectorServiceConfiguration() - * @generated - */ - EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authlist(); - - /** * Returns the meta object for the attribute '{@link org.openecomp.dcae.controller.service.standardeventcollector.service.ControllerServiceStandardeventcollectorServiceConfiguration#getStreamid <em>Streamid</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> @@ -975,28 +975,28 @@ public interface ServicePackage extends EPackage { EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHFLAG = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Authflag(); /** - * The meta object literal for the '<em><b>Checkschemaflag</b></em>' attribute feature. + * The meta object literal for the '<em><b>Authlist</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag(); + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHLIST = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Authlist(); /** - * The meta object literal for the '<em><b>Schemafile</b></em>' attribute feature. + * The meta object literal for the '<em><b>Checkschemaflag</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile(); + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag(); /** - * The meta object literal for the '<em><b>Authlist</b></em>' attribute feature. + * The meta object literal for the '<em><b>Schemafile</b></em>' attribute feature. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ - EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHLIST = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Authlist(); + EAttribute CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE = eINSTANCE.getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile(); /** * The meta object literal for the '<em><b>Streamid</b></em>' attribute feature. diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceConfigurationImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceConfigurationImpl.java index acecfe3..4cdc1e9 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceConfigurationImpl.java +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceConfigurationImpl.java @@ -425,8 +425,8 @@ public class ControllerServiceStandardeventcollectorServiceConfigurationImpl ext * <!-- end-user-doc --> * @generated */ - public String getCheckschemaflag() { - return checkschemaflag; + public String getAuthlist() { + return authlist; } /** @@ -434,11 +434,11 @@ public class ControllerServiceStandardeventcollectorServiceConfigurationImpl ext * <!-- end-user-doc --> * @generated */ - public void setCheckschemaflag(String newCheckschemaflag) { - String oldCheckschemaflag = checkschemaflag; - checkschemaflag = newCheckschemaflag; + public void setAuthlist(String newAuthlist) { + String oldAuthlist = authlist; + authlist = newAuthlist; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG, oldCheckschemaflag, checkschemaflag)); + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHLIST, oldAuthlist, authlist)); } /** @@ -446,8 +446,8 @@ public class ControllerServiceStandardeventcollectorServiceConfigurationImpl ext * <!-- end-user-doc --> * @generated */ - public String getSchemafile() { - return schemafile; + public String getCheckschemaflag() { + return checkschemaflag; } /** @@ -455,11 +455,11 @@ public class ControllerServiceStandardeventcollectorServiceConfigurationImpl ext * <!-- end-user-doc --> * @generated */ - public void setSchemafile(String newSchemafile) { - String oldSchemafile = schemafile; - schemafile = newSchemafile; + public void setCheckschemaflag(String newCheckschemaflag) { + String oldCheckschemaflag = checkschemaflag; + checkschemaflag = newCheckschemaflag; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE, oldSchemafile, schemafile)); + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__CHECKSCHEMAFLAG, oldCheckschemaflag, checkschemaflag)); } /** @@ -467,8 +467,8 @@ public class ControllerServiceStandardeventcollectorServiceConfigurationImpl ext * <!-- end-user-doc --> * @generated */ - public String getAuthlist() { - return authlist; + public String getSchemafile() { + return schemafile; } /** @@ -476,11 +476,11 @@ public class ControllerServiceStandardeventcollectorServiceConfigurationImpl ext * <!-- end-user-doc --> * @generated */ - public void setAuthlist(String newAuthlist) { - String oldAuthlist = authlist; - authlist = newAuthlist; + public void setSchemafile(String newSchemafile) { + String oldSchemafile = schemafile; + schemafile = newSchemafile; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__AUTHLIST, oldAuthlist, authlist)); + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_CONFIGURATION__SCHEMAFILE, oldSchemafile, schemafile)); } /** diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceInstanceImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceInstanceImpl.java index 4269ae8..c8a9d1b 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceInstanceImpl.java +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ControllerServiceStandardeventcollectorServiceInstanceImpl.java @@ -426,8 +426,8 @@ public class ControllerServiceStandardeventcollectorServiceInstanceImpl extends * <!-- end-user-doc --> * @generated */ - public String getCheckschemaflag() { - return checkschemaflag; + public String getAuthlist() { + return authlist; } /** @@ -435,11 +435,11 @@ public class ControllerServiceStandardeventcollectorServiceInstanceImpl extends * <!-- end-user-doc --> * @generated */ - public void setCheckschemaflag(String newCheckschemaflag) { - String oldCheckschemaflag = checkschemaflag; - checkschemaflag = newCheckschemaflag; + public void setAuthlist(String newAuthlist) { + String oldAuthlist = authlist; + authlist = newAuthlist; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG, oldCheckschemaflag, checkschemaflag)); + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHLIST, oldAuthlist, authlist)); } /** @@ -447,8 +447,8 @@ public class ControllerServiceStandardeventcollectorServiceInstanceImpl extends * <!-- end-user-doc --> * @generated */ - public String getSchemafile() { - return schemafile; + public String getCheckschemaflag() { + return checkschemaflag; } /** @@ -456,11 +456,11 @@ public class ControllerServiceStandardeventcollectorServiceInstanceImpl extends * <!-- end-user-doc --> * @generated */ - public void setSchemafile(String newSchemafile) { - String oldSchemafile = schemafile; - schemafile = newSchemafile; + public void setCheckschemaflag(String newCheckschemaflag) { + String oldCheckschemaflag = checkschemaflag; + checkschemaflag = newCheckschemaflag; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE, oldSchemafile, schemafile)); + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__CHECKSCHEMAFLAG, oldCheckschemaflag, checkschemaflag)); } /** @@ -468,8 +468,8 @@ public class ControllerServiceStandardeventcollectorServiceInstanceImpl extends * <!-- end-user-doc --> * @generated */ - public String getAuthlist() { - return authlist; + public String getSchemafile() { + return schemafile; } /** @@ -477,11 +477,11 @@ public class ControllerServiceStandardeventcollectorServiceInstanceImpl extends * <!-- end-user-doc --> * @generated */ - public void setAuthlist(String newAuthlist) { - String oldAuthlist = authlist; - authlist = newAuthlist; + public void setSchemafile(String newSchemafile) { + String oldSchemafile = schemafile; + schemafile = newSchemafile; if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__AUTHLIST, oldAuthlist, authlist)); + eNotify(new ENotificationImpl(this, Notification.SET, ServicePackage.CONTROLLER_SERVICE_STANDARDEVENTCOLLECTOR_SERVICE_INSTANCE__SCHEMAFILE, oldSchemafile, schemafile)); } /** diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServicePackageImpl.java b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServicePackageImpl.java index 6ff6910..ffbb920 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServicePackageImpl.java +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore-gen/org/openecomp/dcae/controller/service/standardeventcollector/service/impl/ServicePackageImpl.java @@ -225,8 +225,8 @@ public class ServicePackageImpl extends EPackageImpl implements ServicePackage { * <!-- end-user-doc --> * @generated */ - public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag() { - return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(8); + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authlist() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(7); } /** @@ -234,8 +234,8 @@ public class ServicePackageImpl extends EPackageImpl implements ServicePackage { * <!-- end-user-doc --> * @generated */ - public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile() { - return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(9); + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Checkschemaflag() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(8); } /** @@ -243,8 +243,8 @@ public class ServicePackageImpl extends EPackageImpl implements ServicePackage { * <!-- end-user-doc --> * @generated */ - public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Authlist() { - return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(7); + public EAttribute getControllerServiceStandardeventcollectorServiceConfiguration_Schemafile() { + return (EAttribute)controllerServiceStandardeventcollectorServiceConfigurationEClass.getEStructuralFeatures().get(9); } /** diff --git a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/service.xcore b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/service.xcore index f63a754..4f3da9a 100644 --- a/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/service.xcore +++ b/dcae-controller-service/dcae-controller-service-standardeventcollector/dcae-controller-service-standardeventcollector-model/src/main/xcore/service.xcore @@ -55,7 +55,7 @@ class ControllerServiceStandardeventcollectorServiceConfiguration { @ecomp(^type = "configuration")
String authflag
@ecomp(^type = "configuration")
- String authlist
+ String authlist
@ecomp(^type = "configuration")
String checkschemaflag
@ecomp(^type = "configuration")
@@ -64,4 +64,3 @@ class ControllerServiceStandardeventcollectorServiceConfiguration { String streamid
}
-
|