diff options
12 files changed, 125 insertions, 38 deletions
diff --git a/docs/installation.rst b/docs/installation.rst index 55d9f225c..9d1fc7017 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -19,7 +19,7 @@ Please follow the instructions given below, for installing VID using a Docker im docker login -u docker -p docker nexus3.onap.org:10001 docker pull nexus3.onap.org:10001/onap/vid:5.0.1 -2. Install by running following command (Use the path for the lf_config folder under the VID git repository as CONFIG_PATH) +2. Install by running following command (Use the path for the lf_config folder under the VID git repository as CONFIG_PATH and path for .jks files for CERTS_PATH, usually epsdk-app-onap/src/main/webapp/WEB-INF/cert ) .. code-block:: bash @@ -27,10 +27,10 @@ Please follow the instructions given below, for installing VID using a Docker im docker run --name vid-mariadb -e MYSQL_DATABASE=vid_openecomp_epsdk -e MYSQL_USER=vidadmin -e MYSQL_PASSWORD=YOUR_PASSWORD -e MYSQL_ROOT_PASSWORD=ROOT_PASSWORD -v CONFIG_PATH/vid-my.cnf:/etc/mysql/my.cnf -v /var/lib/mysql -d mariadb:10 #start VID server - docker run -e VID_MYSQL_DBNAME=vid_openecomp_epsdk -e VID_MYSQL_PASS=YOUR_PASSWORD --name vid-server -p 8080:8080 --link vid-mariadb:vid-mariadb-docker-instance -d nexus3.onap.org:10001/onap/vid:5.0.1 + docker run -e VID_MYSQL_DBNAME=vid_openecomp_epsdk -e VID_MYSQL_PASS=YOUR_PASSWORD -v CERTS_PATH:/opt/app/vid/etc --name vid-server -p 8080:8080 --link vid-mariadb:vid-mariadb-docker-instance -d nexus3.onap.org:10001/onap/vid:5.0.1 Or use docker-compose: .. code-block:: bash - docker-compose up
\ No newline at end of file + docker-compose up diff --git a/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/app.js b/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/app.js index 416dc3272..cb74a6689 100755 --- a/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/app.js +++ b/epsdk-app-onap/src/main/webapp/app/fusion/external/ebz/angular_js/app.js @@ -7,8 +7,8 @@ app.run(function(featureFlags, $http) { $http.get('flags').then(function (results) {
var flags = [];
for (var key in results.data) {
- flags.push({"key":key, "active":results.data[key]})
+ flags.push({"key":key, "active":results.data[key]});
}
featureFlags.set(flags);
- })
+ });
});
diff --git a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/Vlan.java b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/Vlan.java index 8d19ad4a7..008f916ca 100644 --- a/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/Vlan.java +++ b/vid-app-common/src/main/java/org/onap/vid/aai/model/AaiGetNetworkCollectionDetails/Vlan.java @@ -3,6 +3,7 @@ * VID * ================================================================================ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,7 +27,16 @@ import org.onap.vid.aai.model.interfaces.AaiModelWithRelationships; @JsonIgnoreProperties(ignoreUnknown = true) public class Vlan implements AaiModelWithRelationships { + + @JsonProperty("vlan-interface") + private final String vlanInterface; + @JsonProperty("vlan-id-inner") + private final String vlanIdInner; + + @JsonProperty("relationship-list") + public final RelationshipList relationshipList; + public Vlan( @JsonProperty("vlan-interface") String vlanInterface, @JsonProperty("vlan-id-inner") String vlanIdInner, @@ -36,14 +46,7 @@ public class Vlan implements AaiModelWithRelationships { this.relationshipList = relationshipList; } - @JsonProperty("vlan-interface") - private final String vlanInterface; - - @JsonProperty("vlan-id-inner") - private final String vlanIdInner; - - @JsonProperty("relationship-list") - public final RelationshipList relationshipList; + public String getVlanInterface() { return vlanInterface; diff --git a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java index 7980ece5a..51766413f 100644 --- a/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java +++ b/vid-app-common/src/main/java/org/onap/vid/asdc/beans/tosca/Input.java @@ -3,6 +3,7 @@ * VID * ================================================================================ * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2019 IBM. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,16 +32,11 @@ import java.util.List; * The Class Input. */ public class Input { - - public Input(org.onap.sdc.toscaparser.api.parameters.Input input, List<Property> properties){ - this.type = input.getType(); - this.description = input.getDescription(); - this._default = input.getDefault(); - this.inputProperties = new InputProperties(properties); - this.fromInputName = input.getName(); - } - - /** The type. */ + + /** The entry schema. */ + private Input entry_schema; + + /** The type. */ private String type; /** The description. */ @@ -48,9 +44,6 @@ public class Input { /** The default. */ private Object _default; - - /** The entry schema. */ - private Input entry_schema; private InputProperties inputProperties; @@ -68,6 +61,14 @@ public class Input { private String templateInvariantUUID; private String templateCustomizationUUID; + public Input(org.onap.sdc.toscaparser.api.parameters.Input input, List<Property> properties){ + this.type = input.getType(); + this.description = input.getDescription(); + this._default = input.getDefault(); + this.inputProperties = new InputProperties(properties); + this.fromInputName = input.getName(); + } + /** * Instantiates a new input. */ diff --git a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSchedulerInitializer.java b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSchedulerInitializer.java index b3ab75b23..b5c2dd74b 100644 --- a/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSchedulerInitializer.java +++ b/vid-app-common/src/main/java/org/onap/vid/job/impl/JobSchedulerInitializer.java @@ -46,6 +46,14 @@ public class JobSchedulerInitializer { private FeatureManager featureManager; private JobCommandFactory jobCommandFactory; private EELFLoggerDelegate logger = EELFLoggerDelegate.getLogger(JobSchedulerInitializer.class); + public static final List<Job.JobStatus> WORKERS_TOPICS = ImmutableList.of( + Job.JobStatus.PENDING, + Job.JobStatus.CREATING, + Job.JobStatus.IN_PROGRESS, + Job.JobStatus.RESOURCE_IN_PROGRESS, + Job.JobStatus.PENDING_RESOURCE + ); + @Autowired public JobSchedulerInitializer( @@ -61,14 +69,6 @@ public class JobSchedulerInitializer { } - public static final List<Job.JobStatus> WORKERS_TOPICS = ImmutableList.of( - Job.JobStatus.PENDING, - Job.JobStatus.CREATING, - Job.JobStatus.IN_PROGRESS, - Job.JobStatus.RESOURCE_IN_PROGRESS, - Job.JobStatus.PENDING_RESOURCE - ); - @PostConstruct public void init() { WORKERS_TOPICS.forEach(topic->scheduleJobWorker(topic, 1)); diff --git a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java index 7818837f1..d7b3ac602 100644 --- a/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java +++ b/vid-app-common/src/main/java/org/onap/vid/services/AsyncInstantiationBusinessLogicImpl.java @@ -39,7 +39,6 @@ import org.apache.commons.lang3.StringUtils; import org.hibernate.SessionFactory; import org.onap.portalsdk.core.logging.logic.EELFLoggerDelegate; import org.onap.vid.aai.AaiClientInterface; -import org.onap.vid.aai.ExceptionWithRequestInfo; import org.onap.vid.aai.model.ResourceType; import org.onap.vid.dal.AsyncInstantiationRepository; import org.onap.vid.exceptions.DbFailureUncheckedException; diff --git a/vid-automation/TestNg-ApiTest.xml b/vid-automation/TestNg-ApiTest.xml index ddd0f7ba3..9e9380faa 100644 --- a/vid-automation/TestNg-ApiTest.xml +++ b/vid-automation/TestNg-ApiTest.xml @@ -4,6 +4,7 @@ <listeners> <listener class-name="vid.automation.test.infra.FeatureTogglingTestngTransformer" /> + <listener class-name="vid.automation.test.infra.SkipTestUntilTestngTransformer"/> </listeners> <test name="test"> @@ -48,4 +49,4 @@ <package name="org.onap.vid.*"/> </packages> </test> -</suite>
\ No newline at end of file +</suite> diff --git a/vid-automation/TestNg-UI-half.xml b/vid-automation/TestNg-UI-half.xml index 01cdfcc5e..b19073869 100644 --- a/vid-automation/TestNg-UI-half.xml +++ b/vid-automation/TestNg-UI-half.xml @@ -3,6 +3,7 @@ <suite verbose="1" name="VID UI Tests" annotations="JDK"> <listeners> <listener class-name="vid.automation.test.infra.FeatureTogglingTestngTransformer"/> + <listener class-name="vid.automation.test.infra.SkipTestUntilTestngTransformer"/> </listeners> <test name="test"> <method-selectors> @@ -64,4 +65,4 @@ <package name="vid.automation.test.test.*"/> </packages> </test> -</suite>
\ No newline at end of file +</suite> diff --git a/vid-automation/TestNg-dev.xml b/vid-automation/TestNg-dev.xml index b8bc84f96..3dc9d749d 100644 --- a/vid-automation/TestNg-dev.xml +++ b/vid-automation/TestNg-dev.xml @@ -5,6 +5,7 @@ <suite verbose="1" name="VID UI Tests" annotations="JDK"> <listeners> <listener class-name="vid.automation.test.infra.FeatureTogglingTestngTransformer"/> + <listener class-name="vid.automation.test.infra.SkipTestUntilTestngTransformer"/> </listeners> <test name="test"> <groups> @@ -38,4 +39,4 @@ <class name="vid.automation.test.test.NewServiceInstanceTest"/> </classes> </test> -</suite>
\ No newline at end of file +</suite> diff --git a/vid-automation/src/main/java/vid/automation/test/infra/SkipTestUntil.java b/vid-automation/src/main/java/vid/automation/test/infra/SkipTestUntil.java new file mode 100644 index 000000000..5aad0e03a --- /dev/null +++ b/vid-automation/src/main/java/vid/automation/test/infra/SkipTestUntil.java @@ -0,0 +1,21 @@ +package vid.automation.test.infra; + +import static java.lang.annotation.ElementType.METHOD; + +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/* +Skip test until date (AKA TimeBomb) + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({METHOD}) +public @interface SkipTestUntil { + + /** + * Date in the form of "2007-12-20" + */ + String value(); + +} diff --git a/vid-automation/src/main/java/vid/automation/test/infra/SkipTestUntilTestngTransformer.java b/vid-automation/src/main/java/vid/automation/test/infra/SkipTestUntilTestngTransformer.java new file mode 100644 index 000000000..2d2ce7cde --- /dev/null +++ b/vid-automation/src/main/java/vid/automation/test/infra/SkipTestUntilTestngTransformer.java @@ -0,0 +1,57 @@ +package vid.automation.test.infra; + +import java.lang.reflect.Constructor; +import java.lang.reflect.Method; +import java.time.LocalDate; +import org.testng.IAnnotationTransformer; +import org.testng.annotations.ITestAnnotation; + +/* +TestNg listener that skip tests that are annotated with SkipTestUntil annotation +Pay attention that this listener shall be configured in the testng.xml (or command line) +*/ +public class SkipTestUntilTestngTransformer implements IAnnotationTransformer { + + @Override + public void transform(ITestAnnotation annotation, Class testClass, Constructor testConstructor, Method testMethod) { + + if (testMethod!=null) { + try { + + if (!annotation.getEnabled()) { + return; + } + + if (!testMethod.isAnnotationPresent(SkipTestUntil.class)) { + return; + } + + String dateAsStr = testMethod.getAnnotation(SkipTestUntil.class).value(); + if (shallDisableTest(dateAsStr)) { + disableTest(annotation, testMethod.getDeclaringClass().getName(), dateAsStr); + } + + } catch (Exception e) { + e.printStackTrace(); + } + } + } + + private boolean shallDisableTest(String dateAsStr) { + try { + return LocalDate.now().isBefore(LocalDate.parse(dateAsStr)); + } + catch (RuntimeException exception) { + System.out.println("Failure during processing of SkipTestUntil annotation value is " + dateAsStr); + exception.printStackTrace(); + return false; + } + } + + private void disableTest(ITestAnnotation annotation, String name, String dateAsStr) { + System.out.println("Ignore "+ name+" till "+dateAsStr); + annotation.setEnabled(false); + } + +} + diff --git a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java index d72337f3d..20367ea70 100644 --- a/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java +++ b/vid-automation/src/test/java/org/onap/vid/more/LoggerFormatTest.java @@ -9,6 +9,7 @@ import org.onap.vid.api.BaseApiTest; import org.springframework.web.client.RestTemplate; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; +import vid.automation.test.infra.SkipTestUntil; import vid.automation.test.services.SimulatorApi; import java.net.URI; @@ -37,6 +38,7 @@ public class LoggerFormatTest extends BaseApiTest { SimulatorApi.registerExpectationFromPreset(new PresetAAIGetSubscribersGet(), SimulatorApi.RegistrationStrategy.CLEAR_THEN_SET); } + @SkipTestUntil("2019-08-22") @Test public void validateAuditLogsFormat() { validateLogsFormat("audit"); @@ -47,6 +49,7 @@ public class LoggerFormatTest extends BaseApiTest { validateLogsFormat("error"); } + @SkipTestUntil("2019-08-22") @Test public void validateMetricsLogsFormat() { validateLogsFormat("metrics", "metric"); |