summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcus G K Williams <marcus.williams@intel.com>2017-05-02 15:11:04 -0700
committerPatrick Brady <pb071s@att.com>2017-05-16 21:35:04 +0000
commit8aac2df744820304ee29354333661699e9695939 (patch)
treed8d59a60e8b3fe72de750b1f8fdd27cb892280c2
parentfa622476470f31a518c46926261bd7eecd7a2778 (diff)
Remove commented methods/fields in APPC
Taking a stab at removing numerous commented out methods and fields. Almost all of what is removed is commented code with no explanation. Change-Id: I61cb1d7100ae6c75f6d42f500ade0504c97b760c Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefapi/ApiMethod.java24
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefclient/ChefApiClient.java21
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/impl/ChefAdapterImpl.java29
-rw-r--r--appc-adapters/appc-chef-adapter/appc-chef-adapter-features/src/main/resources/features.xml3
-rw-r--r--appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/openecomp/appc/adapter/dmaap/AppcDmaapAdapterActivator.java8
-rw-r--r--appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/NetconfClientRestconf.java5
-rw-r--r--appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/internal/NetconfAdapter2.java1
-rw-r--r--appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/jsch/NetconfClientJsch.java4
-rw-r--r--appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/openecomp/appc/adapter/ssh/Constants.java55
-rw-r--r--appc-common/src/main/java/org/openecomp/appc/encryption/EncryptionTool.java3
-rw-r--r--appc-common/src/main/java/org/openecomp/appc/pool/Pool.java2
-rw-r--r--appc-common/src/main/java/org/openecomp/appc/util/MessageFormatter.java8
-rw-r--r--appc-dg-util/appc-dg-util-bundle/src/main/java/org/openecomp/appc/dg/util/impl/ExecuteNodeActionImpl.java1
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java6
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java2
-rw-r--r--appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java7
-rw-r--r--appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/openecomp/appc/executor/impl/CommandTaskFactory.java4
-rw-r--r--appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/openecomp/appc/dao/util/DBUtils.java17
-rw-r--r--appc-dispatcher/appc-lifecycle-management/appc-lifecycle-management-core/src/main/java/org/openecomp/appc/lifecyclemanager/helper/MetadataReader.java5
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/messageadapter/impl/MessageAdapterDmaapImpl.java8
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/conv/Converter.java1
-rw-r--r--appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/RequestHandlerImpl.java24
-rw-r--r--appc-event-listener/appc-event-listener-bundle/src/main/java/org/openecomp/appc/listener/AppcEventListenerActivator.java18
-rw-r--r--appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProvider.java3
-rw-r--r--appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderClient.java3
25 files changed, 3 insertions, 259 deletions
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefapi/ApiMethod.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefapi/ApiMethod.java
index d2a0eb26f..c3ba7c1f3 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefapi/ApiMethod.java
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefapi/ApiMethod.java
@@ -55,27 +55,8 @@ public class ApiMethod {
private String methodName = "GET";
public String test = "";
private int returnCode;
-// final String KEY_STORE_PATH = "/tmp/chef/trusted_certs/mykeystore.jks";
-// final String KEY_STORE_PASSWORD = "changeit";
public ApiMethod(String methodName) {
-/* try {
- SSLContext sslcontext = SSLContexts.custom()
- .loadTrustMaterial(new File(KEY_STORE_PATH), KEY_STORE_PASSWORD.toCharArray(),
- new TrustSelfSignedStrategy())
- .build();
- SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(
- sslcontext,
- new String[] { "TLSv1" },
- null,
- SSLConnectionSocketFactory.getDefaultHostnameVerifier());
- client = HttpClients.custom()
- .setSSLSocketFactory(sslsf)
- .build();
- } catch (Exception e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }*/
client=HttpClients.createDefault();
this.methodName = methodName;
}
@@ -112,11 +93,6 @@ public class ApiMethod {
for (int i = 0; i < auth_headers.length; i++) {
method.addHeader("X-Ops-Authorization-" + (i + 1), auth_headers[i]);
}
- /*
- * test=test+this.method.getMethod()+"\n"; Header[]
- * RHS=this.method.getHeaders(); for (int i = 0; i < RHS.length; i++) {
- * test=test+RHS[i]+"\n"; } test=test+this.reqBody+"\n";
- */
try{
response = client.execute(method);
resCode = response.getStatusLine().getStatusCode();
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefclient/ChefApiClient.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefclient/ChefApiClient.java
index f3cc44bb2..743fe8456 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefclient/ChefApiClient.java
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefclient/ChefApiClient.java
@@ -67,25 +67,4 @@ public class ChefApiClient {
put.setChefPath(path);
return put;
}
-/* public Post post(String path){
- Post post = new Post(new PostMethod(endpoint+path));
- post.setPemPath(pemPath);
- post.setUserId(userId);
- return post;
- }
-
- public Delete delete(String path){
- Delete del = new Delete(new DeleteMethod(endpoint+path));
- del.setPemPath(pemPath);
- del.setUserId(userId);
- return del;
- }
-
-
-*/
-/* public Header[] buildHeaders(){
-
- return null;
- }
-*/
}
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/impl/ChefAdapterImpl.java b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/impl/ChefAdapterImpl.java
index 39447bb70..5985bcfd1 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/impl/ChefAdapterImpl.java
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/impl/ChefAdapterImpl.java
@@ -215,11 +215,6 @@ public class ChefAdapterImpl implements ChefAdapter {
private Configuration configuration;
/**
- * A cache of providers that are predefined.
- */
- // private Map<String /* provider name */, ProviderCache> providerCache;
-
- /**
* This default constructor is used as a work around because the activator
* wasnt getting called
*/
@@ -293,7 +288,6 @@ public class ChefAdapterImpl implements ChefAdapter {
public void chefGet(Map<String, String> params, SvcLogicContext ctx) {
logger.info("chef get method");
String chefAction= params.get("org.openecomp.appc.instance.chefAction");
- // logger.info(vm_url);
RequestContext rc = new RequestContext(ctx);
rc.isAlive();
//should load pem from somewhere else
@@ -306,13 +300,6 @@ public class ChefAdapterImpl implements ChefAdapter {
String message = am.getResponseBodyAsString();
logger.info(code + " " + message);
chefServerResult(rc,Integer.toString(code),message);
-/* if (code == 200) {
- doSuccess(rc);
- } else {
- String errorcode=code+" ";
- doFailure(rc, HttpStatus.INTERNAL_SERVER_ERROR_500, errorcode);
- }*/
-
}
/**
@@ -323,19 +310,13 @@ public class ChefAdapterImpl implements ChefAdapter {
@Override
public void chefPut(Map<String, String> params, SvcLogicContext ctx) {
- //String tVmIp = params.get("org.openecomp.appc.instance.ip");
- //logger.info(tVmIp);
logger.info("chef PUT method");
logger.info(clientName+" "+clientPrivatekey+" "+chefserver+" "+organizations);
- //String CHEF_NODE_STR= params.get("org.openecomp.appc.instance.chefRequestBody");
String chefAction= params.get("org.openecomp.appc.instance.chefAction");
String runList= params.get("org.openecomp.appc.instance.runList");
String attributes= params.get("org.openecomp.appc.instance.attributes");
logger.info(attributes);
- //attributes="\"reconfig-test\":{\"secret\":\"newpass2\"}";
String CHEF_NODE_STR = "{\"json_class\":\"Chef::Node\",\"default\":{},\"chef_type\":\"node\",\"run_list\":[\""+runList+"\"],\"override\":{},\"automatic\":{},\"normal\":{"+attributes+"},\"name\":\"testnode\",\"chef_environment\":\"_default\"}";
- //String CHEF_NODE_STR = "{\"json_class\":\"Chef::Node\"}";
- // logger.info(vm_url);
RequestContext rc = new RequestContext(ctx);
rc.isAlive();
//should load pem from somewhere else
@@ -349,15 +330,6 @@ public class ChefAdapterImpl implements ChefAdapter {
String message = am.getResponseBodyAsString();
logger.info(code + " " + message);
chefServerResult(rc,Integer.toString(code),message);
-/* if (code == 200) {
- logger.info("chef PUT method success");
- doSuccess(rc);
- } else {
- String errorcode=code+" ";
- logger.info("chef PUT method failure");
- doFailure(rc, HttpStatus.INTERNAL_SERVER_ERROR_500, errorcode);
- }*/
-
}
@@ -371,7 +343,6 @@ public class ChefAdapterImpl implements ChefAdapter {
public void trigger(Map<String, String> params, SvcLogicContext ctx) {
logger.info("Run trigger method");
String tVmIp = params.get("org.openecomp.appc.instance.ip");
- //String tUrl = "http://" + tVmIp;
RequestContext rc = new RequestContext(ctx);
rc.isAlive();
diff --git a/appc-adapters/appc-chef-adapter/appc-chef-adapter-features/src/main/resources/features.xml b/appc-adapters/appc-chef-adapter/appc-chef-adapter-features/src/main/resources/features.xml
index 20596369f..85b7941d8 100644
--- a/appc-adapters/appc-chef-adapter/appc-chef-adapter-features/src/main/resources/features.xml
+++ b/appc-adapters/appc-chef-adapter/appc-chef-adapter-features/src/main/resources/features.xml
@@ -24,8 +24,7 @@
<features name="appc-chef-adapter-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.2.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.2.0 http://karaf.apache.org/xmlns/features/v1.2.0">
-
-<!-- <repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.version}/xml/features</repository> -->
+
<repository>mvn:org.opendaylight.mdsal/features-mdsal/${odl.mdsal.features.version}/xml/features</repository>
<feature name='appc-chef-adapter' description="appc-chef-adapter" version='${project.version}'>
diff --git a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/openecomp/appc/adapter/dmaap/AppcDmaapAdapterActivator.java b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/openecomp/appc/adapter/dmaap/AppcDmaapAdapterActivator.java
index 98b8aa158..c02553dfe 100644
--- a/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/openecomp/appc/adapter/dmaap/AppcDmaapAdapterActivator.java
+++ b/appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/openecomp/appc/adapter/dmaap/AppcDmaapAdapterActivator.java
@@ -74,11 +74,6 @@ public class AppcDmaapAdapterActivator implements BundleActivator {
@Override
public void start(final BundleContext bundleContext) throws Exception {
LOG.info("Starting Bundle " + getName());
-
- /* if (registration == null) {
- Properties properties = ConfigurationFactory.getConfiguration().getProperties();
- registration = bundleContext.registerService(EventSender.class, new EventSenderImpl(properties), null);
- }*/
}
/**
@@ -100,9 +95,6 @@ public class AppcDmaapAdapterActivator implements BundleActivator {
*/
@Override
public void stop(BundleContext ctx) throws Exception {
- /*if (this.registration != null) {
- this.registration.unregister();
- }*/
LOG.info("Stopped Bundle " + getName());
}
diff --git a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/NetconfClientRestconf.java b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/NetconfClientRestconf.java
index 04368615a..25c533cba 100644
--- a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/NetconfClientRestconf.java
+++ b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/NetconfClientRestconf.java
@@ -50,11 +50,6 @@ public interface NetconfClientRestconf {
void configure(String configuration, String deviceMountPointName, String moduleName, String nodeName) throws APPCException;
/*
- backup device configuration
- @param deviceMountPointName - the name of the mounting point in controlle
- */
- //void backupConfiguration(String deviceMountPointName);
- /*
returns configuration of Netconf server
@param deviceMountPointName - the name of the mounting point in controller
@param moduleName - name of the yang model
diff --git a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/internal/NetconfAdapter2.java b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/internal/NetconfAdapter2.java
index e0f166483..d2f563850 100644
--- a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/internal/NetconfAdapter2.java
+++ b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/internal/NetconfAdapter2.java
@@ -98,6 +98,5 @@ public class NetconfAdapter2 {
LOG.debug("Sending message to netconf device:\n" + text);
}
pipedOutIn.write(new NetconfMessage(text).getFrame());
-// pipedOutIn.flush();
}
}
diff --git a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/jsch/NetconfClientJsch.java b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/jsch/NetconfClientJsch.java
index c743b2dd8..1632ba70f 100644
--- a/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/jsch/NetconfClientJsch.java
+++ b/appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/jsch/NetconfClientJsch.java
@@ -50,7 +50,6 @@ public class NetconfClientJsch implements NetconfClient {
private Session session;
private Channel channel;
private NetconfAdapter netconfAdapter;
-// private NetconfAdapter2 netconfAdapter;
@Override
@@ -78,9 +77,6 @@ public class NetconfClientJsch implements NetconfClient {
channel = session.openChannel("subsystem");
((ChannelSubsystem)channel).setSubsystem("netconf");
netconfAdapter = new NetconfAdapter(channel.getInputStream(), channel.getOutputStream());
-// netconfAdapter = new NetconfAdapter2();
-// channel.setInputStream(netconfAdapter.getIn());
-// channel.setOutputStream(netconfAdapter.getOut());
channel.connect(CHANNEL_CONNECT_TIMEOUT);
hello(connectionDetails.getCapabilities());
} catch(Exception e) {
diff --git a/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/openecomp/appc/adapter/ssh/Constants.java b/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/openecomp/appc/adapter/ssh/Constants.java
index 9a160dbff..7eb069f55 100644
--- a/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/openecomp/appc/adapter/ssh/Constants.java
+++ b/appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/openecomp/appc/adapter/ssh/Constants.java
@@ -25,17 +25,6 @@ public class Constants {
private Constants(){}
-// public static final String CONFIGURE_PATH = "/restconf/config/opendaylight-inventory:nodes/node/";
-// public static final String CONNECT_PATH = "/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules";
-// public static final String CHECK_CONNECTION_PATH = "/restconf/operational/opendaylight-inventory:nodes/node/";
-// public static final String DISCONNECT_PATH = "/restconf/config/opendaylight-inventory:nodes/node/controller-config/yang-ext:mount/config:modules/module/odl-sal-netconf-connector-cfg:sal-netconf-connector/";
-//
-// public static final String CONTROLLER_IP = "127.0.0.1";
-// public static final int CONTROLLER_PORT = 8181;
-// public static final String PROTOCOL = "http";
-//
-// public static final String VF_LICENSE = "VF_LICENSE";
-
// tables and fields
public static final String NETCONF_SCHEMA = "sdnctl";
public static final String SDNCTL_SCHEMA = "sdnctl";
@@ -91,51 +80,7 @@ public class Constants {
// constants fo DG
-// public static final String VNF_TYPE_FIELD_NAME = "org.openecomp.appc.vftype";
-// public static final String VNF_VERSION_FIELD_NAME = "org.openecomp.appc.vfversion";
-// public static final String VNF_RESOURCE_VERSION_FIELD_NAME = "org.openecomp.appc.resource-version";
-// public static final String TARGET_VNF_TYPE = "target-vnf-type";
-// public static final String FILE_CONTENT_FIELD_NAME = "file-content";
public static final String CONNECTION_DETAILS_FIELD_NAME = "connection-details";
-// public static final String CONFIGURATION_FILE_FIELD_NAME = "configuration-file-name";
public static final String VNF_HOST_IP_ADDRESS_FIELD_NAME = "vnf-host-ip-address";
-// public static final String UPGRADE_VERSION = "upgrade-version";
public static final String DG_ERROR_FIELD_NAME = "org.openecomp.appc.dg.error";
-// public static final String RESOURCEKEY = "resourceKey";
-// public static final String REQ_ID_FIELD_NAME = "org.openecomp.appc.reqid";
-// public static final String API_VERSION_FIELD_NAME = "org.openecomp.appc.apiversion";
-// public static final String MODEL_ENTITLMENT_POOL_UUID_NAME = "model.entitlement.pool.uuid";
-// public static final String MODEL_LICENSE_KEY_UUID_NAME = "model.license.key.uuid";
-// public static final String ENTITLMENT_POOL_UUID_NAME = "entitlement.pool.uuid";
-// public static final String LICENSE_KEY_UUID_NAME = "license.key.uuid";
-// public static final String IS_ACQUIRE_LICENSE_REQUIRE ="is.acquire-license.require";
-// public static final String IS_RELEASE_LICENSE_REQUIRE ="is.release-license.require";
-//
-// public static final String AAI_ENTITLMENT_POOL_UUID_NAME = "aai.input.data.entitlement-assignment-group-uuid";
-// public static final String AAI_LICENSE_KEY_UUID_NAME = "aai.input.data.license-assignment-group-uuid";
-// public static final String AAI_LICENSE_KEY_VALUE = "aai.input.data.license-key";
-// public static final String IS_AAI_ENTITLEMENT_UPDATE_REQUIRE = "is.aai-entitlement-update.require";
-// public static final String IS_AAI_LICENSE_UPDATE_REQUIRE = "is.aai-license-update.require";
-// public static final String IS_ACQUIRE_ENTITLEMENT_REQUIRE ="is.acquire-entitlement.require";
-// public static final String IS_RELEASE_ENTITLEMENT_REQUIRE ="is.release-entitlement.require";
-//
-// public enum ASDC_ARTIFACTS_FIELDS {
-// SERVICE_UUID,
-// DISTRIBUTION_ID,
-// SERVICE_NAME,
-// SERVICE_DESCRIPTION,
-// RESOURCE_UUID,
-// RESOURCE_INSTANCE_NAME,
-// RESOURCE_NAME,
-// RESOURCE_VERSION,
-// RESOURCE_TYPE,
-// ARTIFACT_UUID,
-// ARTIFACT_TYPE,
-// ARTIFACT_VERSION,
-// ARTIFACT_DESCRIPTION,
-// INTERNAL_VERSION,
-// CREATION_DATE,
-// ARTIFACT_NAME,
-// ARTIFACT_CONTENT
-// }
}
diff --git a/appc-common/src/main/java/org/openecomp/appc/encryption/EncryptionTool.java b/appc-common/src/main/java/org/openecomp/appc/encryption/EncryptionTool.java
index 088fc8570..a8b302698 100644
--- a/appc-common/src/main/java/org/openecomp/appc/encryption/EncryptionTool.java
+++ b/appc-common/src/main/java/org/openecomp/appc/encryption/EncryptionTool.java
@@ -122,8 +122,6 @@ public class EncryptionTool {
*/
@SuppressWarnings("nls")
private EncryptionTool() {
- // encryptor = new BasicTextEncryptor();
- // encryptor.setPassword(secret.toString());
String out = "Found the following security algorithms:";
for (Provider p : Security.getProviders()) {
for (Service s : p.getServices()) {
@@ -147,7 +145,6 @@ public class EncryptionTool {
public synchronized String decrypt(String cipherText) {
if (isEncrypted(cipherText)) {
String encValue = cipherText.substring(ENCRYPTED_VALUE_PREFIX.length());
- // return encryptor.decrypt(encValue);
byte[] plainByte = Base64.decodeBase64(encValue.getBytes());
byte[] decryptByte = xorWithSecret(plainByte);
return new String(decryptByte);
diff --git a/appc-common/src/main/java/org/openecomp/appc/pool/Pool.java b/appc-common/src/main/java/org/openecomp/appc/pool/Pool.java
index 4c5b92474..29a12f432 100644
--- a/appc-common/src/main/java/org/openecomp/appc/pool/Pool.java
+++ b/appc-common/src/main/java/org/openecomp/appc/pool/Pool.java
@@ -267,8 +267,6 @@ public class Pool<T extends Closeable> {
writeLock.unlock();
}
- // return obj;
-
/*
* Now that we have the real object, lets wrap it in a dynamic proxy so that we can intercept the close call and
* just return the context to the free pool. obj.getClass().getInterfaces(). We need to find ALL interfaces that
diff --git a/appc-common/src/main/java/org/openecomp/appc/util/MessageFormatter.java b/appc-common/src/main/java/org/openecomp/appc/util/MessageFormatter.java
index 39c9a67e3..95463321a 100644
--- a/appc-common/src/main/java/org/openecomp/appc/util/MessageFormatter.java
+++ b/appc-common/src/main/java/org/openecomp/appc/util/MessageFormatter.java
@@ -44,14 +44,6 @@ public class MessageFormatter {
for (Map.Entry<String, Object> entry : params.entrySet()) {
formattedMessage = formattedMessage.replaceAll("\\$\\{" + entry.getKey() + "\\}", String.valueOf(entry.getValue()));
}
-/* } else {
- StringBuilder builder = new StringBuilder(formattedMessage);
- builder.append("; output params: [");
- for (Map.Entry<String, Object> entry : params.entrySet()) {
- builder.append(entry.getKey()).append(":").append(String.valueOf(entry.getValue())).append("; ");
- }
- builder.append("]");
- formattedMessage = builder.toString();*/
}
return formattedMessage;
diff --git a/appc-dg-util/appc-dg-util-bundle/src/main/java/org/openecomp/appc/dg/util/impl/ExecuteNodeActionImpl.java b/appc-dg-util/appc-dg-util-bundle/src/main/java/org/openecomp/appc/dg/util/impl/ExecuteNodeActionImpl.java
index e2097a0c0..6f5bb0c92 100644
--- a/appc-dg-util/appc-dg-util-bundle/src/main/java/org/openecomp/appc/dg/util/impl/ExecuteNodeActionImpl.java
+++ b/appc-dg-util/appc-dg-util-bundle/src/main/java/org/openecomp/appc/dg/util/impl/ExecuteNodeActionImpl.java
@@ -50,7 +50,6 @@ public class ExecuteNodeActionImpl implements ExecuteNodeAction {
private static final EELFLogger logger = EELFManager.getInstance().getLogger(ExecuteNodeActionImpl.class);
public ExecuteNodeActionImpl() {
- // getAAIservice();
}
/**
diff --git a/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java b/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java
index 875300ddb..abae77f68 100644
--- a/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java
+++ b/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java
@@ -203,8 +203,6 @@ public class NetconfClientPluginImpl implements NetconfClientPlugin {
client.connect(connectionDetails);
String configuration = client.getConfiguration();
if(configuration !=null){
- // logger.info("*************************************Configuration Output*************************************");
- // logger.info(configuration);
String fullConfig = ctx.getAttribute("fullConfig");
fullConfig = fullConfig==null?"":fullConfig;
ctx.setAttribute("fullConfig",fullConfig + configuration);
@@ -217,10 +215,6 @@ public class NetconfClientPluginImpl implements NetconfClientPlugin {
}else{
ctx.setAttribute("getConfig_Result","failure");
}
- //store configuration in database
- /*NetconfJDBC dsImpl = new NetconfJDBCImpl();
- dsImpl.logDeviceInteraction(null,null,getCurrentDateTime(),configuration);*/
-
} catch (Exception e) {
ctx.setAttribute("getConfig_Result","failure");
logger.error("Error " + e.getMessage());
diff --git a/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java b/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java
index 6fdfcc14c..a11b36f0f 100644
--- a/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java
+++ b/appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java
@@ -77,8 +77,6 @@ public class NetconfDBPluginImpl implements NetconfDBPlugin {
logger.error("Missing configuration for " + params.get(Constants.VNF_TYPE_FIELD_NAME));
throw new APPCException("Missing configuration for " + params.get(Constants.VNF_TYPE_FIELD_NAME) + " in " + Constants.DEVICE_AUTHENTICATION_TABLE_NAME);
}
- // fileContent = dsImpl.retrieveConfigFileName(params.get(Constants.CONFIGURATION_FILE_FIELD_NAME));
- // ctx.setAttribute(Constants.FILE_CONTENT_FIELD_NAME, fileContent);
ctx.setAttribute(Constants.CONNECTION_DETAILS_FIELD_NAME, mapper.writeValueAsString(connectionDetails));
ctx.setAttribute("retrieveVMDSConfiguration_Result","success");
} catch(APPCException e) {
diff --git a/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java b/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java
index 0d2927ec3..780423bc3 100644
--- a/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java
+++ b/appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java
@@ -42,13 +42,6 @@ public interface SshService extends SvcLogicJavaPlugin {
*/
String PARAM_IN_command = "command";
- /*
- String PARAM_IN_host = "host";
- String PARAM_IN_port = "port";
- String PARAM_IN_username = "username";
- String PARAM_IN_password = "password";
- */
-
/**
* Input parameter for SSH command timeout
*/
diff --git a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/openecomp/appc/executor/impl/CommandTaskFactory.java b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/openecomp/appc/executor/impl/CommandTaskFactory.java
index e5ac79cfa..2f9d2c970 100644
--- a/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/openecomp/appc/executor/impl/CommandTaskFactory.java
+++ b/appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/openecomp/appc/executor/impl/CommandTaskFactory.java
@@ -32,10 +32,6 @@ import org.openecomp.appc.workflow.WorkFlowManager;
public class CommandTaskFactory {
-
-// private LCMCommandTask lcmCommandTask;
-// private LCMReadonlyCommandTask LCMReadonlyCommandTask;
-
private RequestHandler requestHandler;
private WorkFlowManager workflowManager;
private LifecycleManager lifecyclemanager;
diff --git a/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/openecomp/appc/dao/util/DBUtils.java b/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/openecomp/appc/dao/util/DBUtils.java
index 294d948a0..520af4fa4 100644
--- a/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/openecomp/appc/dao/util/DBUtils.java
+++ b/appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/openecomp/appc/dao/util/DBUtils.java
@@ -63,21 +63,4 @@ public class DBUtils {
return clearFlag;
}
-
- /*public static DbLibService getDBLibService(){
- DbLibService dblibSvc = null;
- BundleContext bctx = FrameworkUtil.getBundle(SvcLogicDblibStore.class).getBundleContext();
- ServiceReference sref = bctx.getServiceReference("org.openecomp.sdnc.sli.resource.dblib.DBResourceManager");
- if (sref == null) {
-// LOG.warn("Could not find service reference for DBLIB service (org.openecomp.sdnc.sli.resource.dblib.DBResourceManager)");
- }
- else {
- dblibSvc = (DbLibService)bctx.getService(sref);
- if (dblibSvc == null)
- {
-// LOG.warn("Could not find service reference for DBLIB service (org.openecomp.sdnc.sli.resource.dblib.DBResourceManager)");
- }
- }
- return dblibSvc;
- }*/
}
diff --git a/appc-dispatcher/appc-lifecycle-management/appc-lifecycle-management-core/src/main/java/org/openecomp/appc/lifecyclemanager/helper/MetadataReader.java b/appc-dispatcher/appc-lifecycle-management/appc-lifecycle-management-core/src/main/java/org/openecomp/appc/lifecyclemanager/helper/MetadataReader.java
index 516bb7e4b..82c497d58 100644
--- a/appc-dispatcher/appc-lifecycle-management/appc-lifecycle-management-core/src/main/java/org/openecomp/appc/lifecyclemanager/helper/MetadataReader.java
+++ b/appc-dispatcher/appc-lifecycle-management/appc-lifecycle-management-core/src/main/java/org/openecomp/appc/lifecyclemanager/helper/MetadataReader.java
@@ -53,7 +53,6 @@ public class MetadataReader {
State STOPPING = new State(VNFStates.Stopping.toString());
State STOPPED = new State(VNFStates.Stopped.toString());
-// State PRE_UPGRADE_TESTING = new State(VNFStates.Pre_Upgrade_Testing.toString());
State BACKING_UP = new State(VNFStates.Backing_Up.toString());
State SNAPSHOTTING = new State(VNFStates.Snapshotting.toString());
State SOFTWARE_UPLOADING = new State(VNFStates.Software_Uploading.toString());
@@ -106,7 +105,6 @@ public class MetadataReader {
builder = builder.addState(TERMINATING);
builder = builder.addState(STOPPING);
builder = builder.addState(STOPPED);
-// builder = builder.addState(PRE_UPGRADE_TESTING);
builder = builder.addState(BACKING_UP);
builder = builder.addState(SNAPSHOTTING);
builder = builder.addState(SOFTWARE_UPLOADING);
@@ -306,9 +304,6 @@ public class MetadataReader {
builder = builder.addTransition(STOPPING,SUCCESS,STOPPED);
builder = builder.addTransition(STOPPING,FAILURE,ERROR);
-// builder = builder.addTransition(PRE_UPGRADE_TESTING,SUCCESS,TESTED);
-// builder = builder.addTransition(PRE_UPGRADE_TESTING,FAILURE,ERROR);
-
builder = builder.addTransition(BACKING_UP,SUCCESS,RUNNING);
builder = builder.addTransition(BACKING_UP,FAILURE,ERROR);
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/messageadapter/impl/MessageAdapterDmaapImpl.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/messageadapter/impl/MessageAdapterDmaapImpl.java
index 9f74ad438..21c21db93 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/messageadapter/impl/MessageAdapterDmaapImpl.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/messageadapter/impl/MessageAdapterDmaapImpl.java
@@ -48,8 +48,6 @@ public class MessageAdapterDmaapImpl implements MessageAdapter{
private String apiKey;
private String apiSecret;
- private Integer READ_TIMEOUT;
-
private static final EELFLogger logger = EELFManager.getInstance().getLogger(MessageAdapterDmaapImpl.class);
/**
@@ -75,15 +73,9 @@ public class MessageAdapterDmaapImpl implements MessageAdapter{
}
pool = new HashSet<>();
if (props != null) {
- // readTopic = props.getProperty("dmaap.topic.read");
writeTopic = props.getProperty("dmaap.topic.write");
apiKey = props.getProperty("dmaap.client.key");
apiSecret = props.getProperty("dmaap.client.secret");
- /* clientName = props.getProperty("dmaap.client.name", "APP-C");
- clientId = props.getProperty("dmaap.client.name.id", "0");
- filter_json = props.getProperty("dmaap.topic.read.filter");
- */
- // READ_TIMEOUT = Integer.valueOf(props.getProperty("dmaap.topic.read.timeout", String.valueOf(READ_TIMEOUT)));
String hostnames = props.getProperty("dmaap.poolMembers");
if (hostnames != null && !hostnames.isEmpty()) {
for (String name : hostnames.split(",")) {
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/conv/Converter.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/conv/Converter.java
index e72eb89a7..3513516ae 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/conv/Converter.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/conv/Converter.java
@@ -90,7 +90,6 @@ public class Converter {
Action action = Action.valueOf(vnfOperation.name());
CommonHeader commonHeader = convAsyncResponseTorev160108CommonHeader(response);
Status status = convAsyncResponseTorev160108Status(response);
-// Payload payload = convAsyncResponseTorev160108Payload(inObj);
switch (action){
case Rollback:
outObj = new RollbackOutputBuilder();
diff --git a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/RequestHandlerImpl.java b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/RequestHandlerImpl.java
index 0273c7957..d63cb8bb8 100644
--- a/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/RequestHandlerImpl.java
+++ b/appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/RequestHandlerImpl.java
@@ -670,8 +670,6 @@ public class RequestHandlerImpl implements RequestHandler {
if (logger.isTraceEnabled()) {
logger.trace("Entering to postMessageToDMaaP with AsyncResponse = " + ObjectUtils.toString(responseContext));
}
- /*boolean updated = updateAsyncResponseStatus(responseContext, isTTLEnd, aaiUpdateSuccess);
- */
boolean callbackResponse = messageAdapter.post(operation, rpcName, responseContext);
if (!callbackResponse) {
logger.error("DMaaP posting status: " + callbackResponse, "dmaapMessage: " + responseContext);
@@ -680,28 +678,6 @@ public class RequestHandlerImpl implements RequestHandler {
logger.trace("Exiting from postMessageToDMaaP with (callbackResponse = " + ObjectUtils.toString(callbackResponse) + ")");
}
- //returns true if asyncResponse was modified
- /* private boolean updateAsyncResponseStatus(ResponseContext asyncResponse, boolean isTTLEnd, boolean aaiUpdateSuccess) {
- boolean updated = false;
- if (logger.isTraceEnabled())
- logger.trace("Entering to updateAsyncResponseStatus with AsyncResponse = "+ObjectUtils.toString(asyncResponse)+ ", isTTLEnd = "+ ObjectUtils.toString(isTTLEnd)+ ", aaiUpdateSuccess = "+ ObjectUtils.toString(aaiUpdateSuccess));
- if(!aaiUpdateSuccess){
- if (asyncResponse.getStatus().getCode() == 0 || asyncResponse.getStatus().getCode() == LCMCommandStatus.SUCCESS.getResponseCode()) {
- asyncResponse.getStatus().setCode(LCMCommandStatus.UPDATE_AAI_FAILURE.getResponseCode());
- asyncResponse.getStatus().setMessage(LCMCommandStatus.UPDATE_AAI_FAILURE.getResponseMessage());
- updated = true;
- }
- }else if(isTTLEnd){
- asyncResponse.getStatus().setCode(LCMCommandStatus.EXPIRED_REQUEST_FAILURE.getResponseCode());
- asyncResponse.getStatus().setMessage(LCMCommandStatus.EXPIRED_REQUEST_FAILURE.getResponseMessage());
- updated = true;
- }
- if (logger.isTraceEnabled())
- logger.trace("Exiting from updateAsyncResponseStatus with (asyncResponse = "+ ObjectUtils.toString(asyncResponse)+")");
- return updated;
- }*/
-
-
/**
* This method perform following operations required if TTL ends when request still waiting in execution queue .
* It posts asynchronous response to message bus (DMaaP).
diff --git a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/openecomp/appc/listener/AppcEventListenerActivator.java b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/openecomp/appc/listener/AppcEventListenerActivator.java
index 4c2e28196..b5f0af598 100644
--- a/appc-event-listener/appc-event-listener-bundle/src/main/java/org/openecomp/appc/listener/AppcEventListenerActivator.java
+++ b/appc-event-listener/appc-event-listener-bundle/src/main/java/org/openecomp/appc/listener/AppcEventListenerActivator.java
@@ -117,27 +117,11 @@ public class AppcEventListenerActivator implements BundleActivator {
Properties props = configuration.getProperties();
Set<ListenerProperties> listeners = new HashSet<ListenerProperties>();
-
- // Configure App-C Closed Loop Listener
-/* ListenerProperties clProps = new ListenerProperties("appc.ClosedLoop", props);
- clProps.setListenerClass(org.openecomp.appc.listener.CL.impl.ListenerImpl.class);
- listeners.add(clProps);*/
// Configure App-C 1607 Closed Loop Listener
ListenerProperties cl1607Props = new ListenerProperties("appc.ClosedLoop1607", props);
cl1607Props.setListenerClass(org.openecomp.appc.listener.CL1607.impl.ListenerImpl.class);
- listeners.add(cl1607Props);
-
-
-/* ListenerProperties clLCMProps = new ListenerProperties("appc.LCM", props);
- clLCMProps.setListenerClass(org.openecomp.appc.listener.LCM.impl.ListenerImpl.class);
- listeners.add(clLCMProps);*/
-
-/*
- ListenerProperties clLCMProps1607 = new ListenerProperties("appc.LCM1607", props);
- clLCMProps1607.setListenerClass(org.openecomp.appc.listener.LCM1607.impl.ListenerImpl.class);
- listeners.add(clLCMProps1607);
-*/
+ listeners.add(cl1607Props);
adapter = new ControllerImpl(listeners);
if (ctx != null && registration == null) {
diff --git a/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProvider.java b/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProvider.java
index bdfb4fe56..c65cc656e 100644
--- a/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProvider.java
+++ b/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProvider.java
@@ -246,8 +246,7 @@ public Future<RpcResult<ModifyConfigOutput>> modifyConfig(ModifyConfigInput inpu
VnfResource vnf = input.getVnfResource();
TopologyService topology = new TopologyService(this);
- // RpcResult<RestartOutput> result = topology.restart(hdr, vnf);
- return null;// Futures.immediateFuture(result);
+ return null;
}
/**
diff --git a/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderClient.java b/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderClient.java
index 713f3dcbe..0224784d6 100644
--- a/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderClient.java
+++ b/appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderClient.java
@@ -72,9 +72,6 @@ public class AppcProviderClient {
LOG.debug("Parameters returned by SLI: " + StringHelper.propertiesToString(respProps));
metricsLogger.info("Parameters returned by SLI: " + StringHelper.propertiesToString(respProps));
- // No impact on flow. Not sure why it is here
- // if ("failure".equalsIgnoreCase(respProps.getProperty("SvcLogic.status"))) { return (respProps); }
-
return respProps;
}
}