import com.att.cdp.zones.model.Image;
import com.att.cdp.zones.model.Server;
import com.att.cdp.zones.model.Stack;
-import com.att.eelf.configuration.EELFLogger;
-import com.att.eelf.configuration.EELFManager;
import org.onap.ccsdk.sli.core.sli.SvcLogicContext;
import java.util.HashMap;
import java.util.List;
String userId = null;
String password = null;
// domain is not required so set a default
- String domain = DEFAULT_DOMAIN_NAME;
+ String domain = ProviderAdapterImpl.DEFAULT_DOMAIN_NAME;
for (Node node2 : node.getChildren()) {
switch (node2.getName()) {
case Property.PROVIDER_TENANT_NAME:
break;
case Property.PROVIDER_TENANT_USERID:
userId = node2.getValue();
- DEFAULT_USER = node2.getValue();
+ ProviderAdapterImpl.DEFAULT_USER = node2.getValue();
break;
case Property.PROVIDER_TENANT_PASSWORD:
// convert password from Base64 encrypted string prefixed with 'enc:'
password = EncryptionTool.getInstance().encrypt(node2.getValue());
- DEFAULT_PASS = node2.getValue();
+ ProviderAdapterImpl.DEFAULT_PASS = node2.getValue();
break;
case Property.PROVIDER_TENANT_DOMAIN:
domain = node2.getValue();
- DEFAULT_DOMAIN = node2.getValue();
+ ProviderAdapterImpl.DEFAULT_DOMAIN = node2.getValue();
+ break;
+ default:
break;
}
}
}
accumulatedTime += (now - startTime);
startTime = now;
- if (accumulatedTime > timeToLive) {
- return false;
- }
- return true;
+ return !(accumulatedTime > timeToLive);
}
/**
}\r
}\r
builder.append(String.format("%d services:%n", serviceEndpoints.size())); //$NON-NLS-1$\r
- for (String serviceType : serviceEndpoints.keySet()) {\r
- List<Service.Endpoint> endpoints = serviceEndpoints.get(serviceType);\r
- Service service = serviceTypes.get(serviceType);\r
+ for(Map.Entry<String, List<Access.Service.Endpoint>> entry : serviceEndpoints.entrySet()){\r
+ List<Service.Endpoint> endpoints = entry.getValue();\r
+ Service service = serviceTypes.get(entry.getKey());\r
\r
builder.append(String.format("\t%s [%s] - %d endpoints%n", service.getType(), service.getName(), //$NON-NLS-1$\r
endpoints.size()));\r
public class MetricActivator implements BundleActivator {
- private ServiceRegistration registration = null;
-
private static final EELFLogger logger = EELFManager.getInstance().getLogger(MetricActivator.class);
@Override
MetricService impl = new MetricServiceImpl();
String regName = MetricService.class.getName();
logger.debug("Registering Metric service " + regName);
- registration = bundleContext.registerService(regName, impl, null);
+ ServiceRegistration registration = bundleContext.registerService(regName, impl, null);
logger.debug("Registered Metric service " + regName);
}
log.debug("Cloud Owner" + cloudOwnerValue);
log.debug("CloudRegionId" + cloudOwnerValue);
- Map<String, String> paramsCloud = new HashMap<String, String>();
+ Map<String, String> paramsCloud = new HashMap<>();
paramsCloud.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX,
inParams.get(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX));
String vfModuleForVserver = vmServerCtx.getAttribute(responsePrefix + "vm.vf-module-id");
if (vnfcName != null) {
- Map<String, String> paramsVnfc = new HashMap<String, String>();
+ Map<String, String> paramsVnfc = new HashMap<>();
paramsVnfc.put(PARAM_VNFC_NAME, vnfcName);
paramsVnfc.put(AppcAaiClientConstant.INPUT_PARAM_RESPONSE_PREFIX,