diff options
Diffstat (limited to 'asdc-controller')
2 files changed, 20 insertions, 22 deletions
diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java index d57b305902..7efc397e30 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/installer/heat/ToscaResourceInstaller.java @@ -2227,28 +2227,6 @@ public class ToscaResourceInstaller { .setModelCustomizationUUID(fabricMetadata.getValue(SdcPropertyNames.PROPERTY_NAME_CUSTOMIZATIONUUID)); cvnfcConfigurationCustomization.setModelInstanceName(fabricEntity.getName()); - List<IEntityDetails> policyList = - getEntityDetails(toscaResourceStruct, EntityQuery.newBuilder("org.openecomp.policies.External"), - TopologyTemplateQuery.newBuilder(SdcTypes.VF), true); - - - if (policyList != null) { - for (IEntityDetails policyEntity : policyList) { - - for (String policyCvfcTarget : policyEntity.getTargets()) { - - if (policyCvfcTarget.equalsIgnoreCase(vfModuleMemberName)) { - - String policyType = getLeafPropertyValue(policyEntity, "type"); - - if (policyType != null && policyType.equalsIgnoreCase("Fabric Policy")) { - cvnfcConfigurationCustomization.setPolicyName(getLeafPropertyValue(policyEntity, "name")); - } - } - } - } - } - cvnfcConfigurationCustomization.setConfigurationFunction(getLeafPropertyValue(fabricEntity, "function")); cvnfcConfigurationCustomization.setConfigurationRole(getLeafPropertyValue(fabricEntity, "role")); cvnfcConfigurationCustomization.setConfigurationType(getLeafPropertyValue(fabricEntity, "type")); diff --git a/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/AaiClientPropertiesImpl.java b/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/AaiClientPropertiesImpl.java index 7b89af0910..ace0ff1f57 100644 --- a/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/AaiClientPropertiesImpl.java +++ b/asdc-controller/src/main/java/org/onap/so/asdc/tenantIsolation/AaiClientPropertiesImpl.java @@ -24,6 +24,7 @@ import java.net.MalformedURLException; import java.net.URL; import org.onap.aaiclient.client.aai.AAIProperties; import org.onap.aaiclient.client.aai.AAIVersion; +import org.onap.so.client.CacheProperties; import org.onap.so.spring.SpringContextHelper; import org.springframework.context.ApplicationContext; @@ -33,6 +34,8 @@ public class AaiClientPropertiesImpl implements AAIProperties { private String auth; private String key; private Long readTimeout; + private boolean enableCaching; + private Long cacheMaxAge; private static final String SYSTEM_NAME = "MSO"; public AaiClientPropertiesImpl() { @@ -41,6 +44,8 @@ public class AaiClientPropertiesImpl implements AAIProperties { this.auth = context.getEnvironment().getProperty("aai.auth"); this.key = context.getEnvironment().getProperty("mso.msoKey"); this.readTimeout = context.getEnvironment().getProperty("aai.readTimeout", Long.class, new Long(60000)); + this.enableCaching = context.getEnvironment().getProperty("aai.caching.enabled", Boolean.class, false); + this.cacheMaxAge = context.getEnvironment().getProperty("aai.caching.maxAge", Long.class, 60000L); } @Override @@ -74,4 +79,19 @@ public class AaiClientPropertiesImpl implements AAIProperties { public Long getReadTimeout() { return this.readTimeout; } + + @Override + public boolean isCachingEnabled() { + return this.enableCaching; + } + + @Override + public CacheProperties getCacheProperties() { + return new AAICacheProperties() { + @Override + public Long getMaxAge() { + return cacheMaxAge; + } + }; + } } |