diff options
author | Marcus G K Williams <marcus.williams@intel.com> | 2017-05-02 15:11:04 -0700 |
---|---|---|
committer | Patrick Brady <pb071s@att.com> | 2017-05-16 21:35:04 +0000 |
commit | 8aac2df744820304ee29354333661699e9695939 (patch) | |
tree | d8d59a60e8b3fe72de750b1f8fdd27cb892280c2 /appc-adapters | |
parent | fa622476470f31a518c46926261bd7eecd7a2778 (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>
Diffstat (limited to 'appc-adapters')
9 files changed, 1 insertions, 149 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 -// } } |