diff options
Diffstat (limited to 'appc-adapters')
3 files changed, 10 insertions, 13 deletions
diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ProviderAdapterImpl.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ProviderAdapterImpl.java index cd14ffadc..8c0a61bed 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ProviderAdapterImpl.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ProviderAdapterImpl.java @@ -40,8 +40,6 @@ import org.onap.appc.util.StructuredPropertyHelper.Node; 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; @@ -274,7 +272,7 @@ public class ProviderAdapterImpl implements ProviderAdapter { 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: @@ -282,16 +280,18 @@ public class ProviderAdapterImpl implements ProviderAdapter { 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; } } diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java index 2456e274b..8c2833dfc 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/RequestContext.java @@ -193,10 +193,7 @@ public class RequestContext { } accumulatedTime += (now - startTime); startTime = now; - if (accumulatedTime > timeToLive) { - return false; - } - return true; + return !(accumulatedTime > timeToLive); } /** diff --git a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV2.java b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV2.java index 73872040b..4fe0c2e33 100644 --- a/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV2.java +++ b/appc-adapters/appc-iaas-adapter/appc-iaas-adapter-bundle/src/main/java/org/onap/appc/adapter/iaas/impl/ServiceCatalogV2.java @@ -312,9 +312,9 @@ public class ServiceCatalogV2 extends ServiceCatalog { }
}
builder.append(String.format("%d services:%n", serviceEndpoints.size())); //$NON-NLS-1$
- for (String serviceType : serviceEndpoints.keySet()) {
- List<Service.Endpoint> endpoints = serviceEndpoints.get(serviceType);
- Service service = serviceTypes.get(serviceType);
+ for(Map.Entry<String, List<Access.Service.Endpoint>> entry : serviceEndpoints.entrySet()){
+ List<Service.Endpoint> endpoints = entry.getValue();
+ Service service = serviceTypes.get(entry.getKey());
builder.append(String.format("\t%s [%s] - %d endpoints%n", service.getType(), service.getName(), //$NON-NLS-1$
endpoints.size()));
|