Remove commented methods/fields in APPC 27/3827/2
authorMarcus G K Williams <marcus.williams@intel.com>
Tue, 2 May 2017 22:11:04 +0000 (15:11 -0700)
committerPatrick Brady <pb071s@att.com>
Tue, 16 May 2017 21:35:04 +0000 (21:35 +0000)
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>
25 files changed:
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefapi/ApiMethod.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/chefclient/ChefApiClient.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/openecomp/appc/adapter/chef/impl/ChefAdapterImpl.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-features/src/main/resources/features.xml
appc-adapters/appc-dmaap-adapter/appc-dmaap-adapter-bundle/src/main/java/org/openecomp/appc/adapter/dmaap/AppcDmaapAdapterActivator.java
appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/NetconfClientRestconf.java
appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/internal/NetconfAdapter2.java
appc-adapters/appc-netconf-adapter/appc-netconf-adapter-bundle/src/main/java/org/openecomp/appc/adapter/netconf/jsch/NetconfClientJsch.java
appc-adapters/appc-ssh-adapter/appc-ssh-adapter-api/src/main/java/org/openecomp/appc/adapter/ssh/Constants.java
appc-common/src/main/java/org/openecomp/appc/encryption/EncryptionTool.java
appc-common/src/main/java/org/openecomp/appc/pool/Pool.java
appc-common/src/main/java/org/openecomp/appc/util/MessageFormatter.java
appc-dg-util/appc-dg-util-bundle/src/main/java/org/openecomp/appc/dg/util/impl/ExecuteNodeActionImpl.java
appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfClientPluginImpl.java
appc-dg/appc-dg-shared/appc-dg-netconf/src/main/java/org/openecomp/appc/dg/netconf/impl/NetconfDBPluginImpl.java
appc-dg/appc-dg-shared/appc-dg-ssh/src/main/java/org/openecomp/appc/dg/ssh/SshService.java
appc-dispatcher/appc-command-executor/appc-command-executor-core/src/main/java/org/openecomp/appc/executor/impl/CommandTaskFactory.java
appc-dispatcher/appc-dispatcher-common/appc-data-access-lib/src/main/java/org/openecomp/appc/dao/util/DBUtils.java
appc-dispatcher/appc-lifecycle-management/appc-lifecycle-management-core/src/main/java/org/openecomp/appc/lifecyclemanager/helper/MetadataReader.java
appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/messageadapter/impl/MessageAdapterDmaapImpl.java
appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/conv/Converter.java
appc-dispatcher/appc-request-handler/appc-request-handler-core/src/main/java/org/openecomp/appc/requesthandler/impl/RequestHandlerImpl.java
appc-event-listener/appc-event-listener-bundle/src/main/java/org/openecomp/appc/listener/AppcEventListenerActivator.java
appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProvider.java
appc-provider/appc-provider-bundle/src/main/java/org/openecomp/appc/provider/AppcProviderClient.java

index d2a0eb2..c3ba7c1 100644 (file)
@@ -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();
index f3cc44b..743fe84 100644 (file)
@@ -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;
-       }
-*/
 }
index 39447bb..5985bcf 100644 (file)
@@ -214,11 +214,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();
 
index 2059636..85b7941 100644 (file)
@@ -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}'>
index 98b8aa1..c02553d 100644 (file)
@@ -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());
     }
 
index 0436861..25c533c 100644 (file)
@@ -49,11 +49,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
index c743b2d..1632ba7 100644 (file)
@@ -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) {
index 9a160db..7eb069f 100644 (file)
@@ -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
-//    }
 }
index 088fc85..a8b3026 100644 (file)
@@ -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);
index 4c5b924..29a12f4 100644 (file)
@@ -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
index 39c9a67..9546332 100644 (file)
@@ -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;
index e2097a0..6f5bb0c 100644 (file)
@@ -50,7 +50,6 @@ public class ExecuteNodeActionImpl implements ExecuteNodeAction {
     private static final EELFLogger logger = EELFManager.getInstance().getLogger(ExecuteNodeActionImpl.class);
 
     public ExecuteNodeActionImpl() {
-        // getAAIservice();
     }
 
     /**
index 875300d..abae77f 100644 (file)
@@ -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());
index 6fdfcc1..a11b36f 100644 (file)
@@ -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) {
index 0d2927e..780423b 100644 (file)
@@ -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
         */
index e5ac79c..2f9d2c9 100644 (file)
@@ -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;
index 294d948..520af4f 100644 (file)
@@ -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;
-       }*/
 }
index 516bb7e..82c497d 100644 (file)
@@ -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);
 
index 9f74ad4..21c21db 100644 (file)
@@ -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(",")) {
index e72eb89..3513516 100644 (file)
@@ -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();
index 0273c79..d63cb8b 100644 (file)
@@ -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).
index 4c2e281..b5f0af5 100644 (file)
@@ -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) {
index bdfb4fe..c65cc65 100644 (file)
@@ -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;
     }
 
     /**
index 713f3dc..0224784 100644 (file)
@@ -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;
     }
 }