rev: v4.3.0
hooks:
- id: trailing-whitespace
- exclude: '^ordmodels/'
+ exclude: '^ordmodels/|.diff$'
# ordmodels trailing blanks shall preferably be fixed in OpenROADM upstream repo
- repo: https://github.com/jorisroovers/gitlint
return ModelMappingUtils.createCreateServiceReply(input, ResponseCodes.FINAL_ACK_YES,
LogMessages.serviceInDS(serviceName), ResponseCodes.RESPONSE_FAILED);
}
+ // TODO: Here we also have to check if there is an associated temp-service.
+ // TODO: If there is one, delete it from the temp-service-list??
this.pceListenerImpl.setInput(new ServiceInput(input));
this.pceListenerImpl.setServiceReconfigure(false);
this.pceListenerImpl.setTempService(false);
this.pceListenerImpl.setserviceDataStoreOperations(this.serviceDataStoreOperations);
this.rendererListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
this.rendererListenerImpl.setServiceInput(new ServiceInput(input));
+ // This ensures that the temp-service boolean is false, especially, when
+ // service-create is initiated after the temp-service-create
+ this.rendererListenerImpl.setTempService(false);
this.networkModelListenerImpl.setserviceDataStoreOperations(serviceDataStoreOperations);
LOG.debug(SERVICE_CREATE_MSG, LogMessages.PCE_CALLING);
PathComputationRequestOutput output = this.pceServiceWrapper.performPCE(input, true);
} else {
OperationResult operationResult = this.serviceDataStoreOperations.modifyService(
serviceRpcResultSp.getServiceName(), State.InService, AdminStates.InService);
+ // Here the service is implemented and the tempService has to be deleted if present
+ String commonId = input.getCommonId();
+ if (commonId != null) {
+ if (this.serviceDataStoreOperations.getTempService(commonId).isPresent()) {
+ LOG.info("Temp-service exists with the common-Id {}", commonId);
+ // Delete the common-id from this temp-service-list here
+ OperationResult tempServiceListDelete = serviceDataStoreOperations.deleteTempService(commonId);
+ LOG.info("Result for temp-service-list with {} is {}", commonId, tempServiceListDelete);
+ }
+ }
+
if (operationResult.isSuccess()) {
sendNbiNotification(nbiNotificationBuilder
.setResponseFailed("")
RUN apk --update add \
build-base \
+ checkbashisms \
+ curl \
linux-headers \
git \
gcc \
libxslt-dev \
maven \
openjdk17-jdk \
+ openssl-dev \
python3 \
python3-dev \
py3-pip \
. xtesting/bin/activate
pip install ansible
ansible-galaxy install collivier.xtesting
+## Until https://github.com/collivier/ansible-role-xtesting/pull/19 is fixed, the following command
+## or any equivalent must be performed so that the playbook correctly performs Jenkins configuration
+## sed -i_ 's/port\:{/port: {/' ~/.ansible/roles/collivier.xtesting/templates/run.yaml.j2
ansible-galaxy collection install ansible.posix community.general community.grafana community.kubernetes community.docker community.postgresql
ansible-playbook site.yml
deactivate
--- /dev/null
+diff --git a/tox.ini b/tox.ini
+index 7cae5c70..dd44b57a 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -94,7 +94,7 @@ commands =
+ ./build_karaf_for_tests.sh
+
+ [testenv:tests121]
+-depends = buildcontroller,build_karaf_tests121,sims121,testsPCE
++depends = buildcontroller,build_karaf_tests121,sims121
+ # testsPCE dependency is only here to chain tests in the gate and avoid resources starvation
+ allowlist_externals = launch_tests.sh
+ passenv = LAUNCHER, USE_LIGHTY, NO_ODL_STARTUP, USE_ODL_RESTCONF_VERSION
+@@ -127,7 +127,7 @@ commands =
+ ./build_karaf_for_tests.sh
+
+ [testenv:tests221]
+-depends = buildcontroller,build_karaf_tests221,sims221,tests71
++depends = buildcontroller,build_karaf_tests221,sims221,tests_tapi
+ # tests71 dependency is only here to chain tests in the gate and avoid ressources starvation
+ allowlist_externals = launch_tests.sh
+ passenv = LAUNCHER, USE_LIGHTY, NO_ODL_STARTUP, USE_ODL_RESTCONF_VERSION
+@@ -152,7 +152,7 @@ commands =
+ ./build_karaf_for_tests.sh
+
+ [testenv:tests71]
+-depends = buildcontroller,build_karaf_tests71,sims71,tests_tapi
++depends = buildcontroller,build_karaf_tests71,sims71
+ allowlist_externals = launch_tests.sh
+ passenv = LAUNCHER, USE_LIGHTY, NO_ODL_STARTUP, USE_ODL_RESTCONF_VERSION
+ setenv =
suites:
- container: tpce0
tests:
- - pre-commit
+ - combined
+# - linters
+# - build
+# - PCE
+# - 121
+# - 221
+# - 71
+# - hybrid
---
tiers:
-
- name: transportpce
+ name: suites
+ order: 0
+ description: 'transportPCE tests by category'
+ testcases:
+ -
+ case_name: linters
+ project_name: transportpce
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: 'linters suite'
+ run:
+ name: 'bashfeature'
+ args:
+ cmd: 'cd /src/transportpce && tox -o -p auto -e docs,docs-linkcheck,pre-commit,checkbashisms,pylint'
+ console: true
+ -
+ case_name: build
+ project_name: transportpce
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: 'build transportpce with karaf and lighty.io'
+ run:
+ name: 'bashfeature'
+ args:
+ cmd: 'cd /src/transportpce && tox -e buildcontroller,buildlighty'
+ console: true
+ -
+ case_name: PCE
+ project_name: transportpce
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: 'run PCE tests'
+ run:
+ name: 'bashfeature'
+ args:
+ cmd: 'cd /src/transportpce && tox -e buildcontroller,testsPCE'
+ console: true
+ -
+ case_name: 121
+ project_name: transportpce
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: 'run OpenROADM device 1.2.1 tests suite'
+ run:
+ name: 'bashfeature'
+ args:
+ cmd: 'cd /src/transportpce && tox -e buildcontroller,build_karaf_tests121,sims121,tests121'
+ console: true
+ -
+ case_name: 221
+ project_name: transportpce
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: 'run OpenROADM device 2.2.1 tests suite'
+ run:
+ name: 'bashfeature'
+ args:
+ cmd: 'cd /src/transportpce && tox -e buildcontroller,build_karaf_tests221,sims221,tests221'
+ console: true
+ -
+ case_name: 71
+ project_name: transportpce
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: 'run OpenROADM device 7.1 tests suite'
+ run:
+ name: 'bashfeature'
+ args:
+ cmd: 'cd /src/transportpce && tox -e buildcontroller,build_karaf_tests71,sims71,tests71'
+ console: true
+ -
+ case_name: hybrid
+ project_name: transportpce
+ criteria: 100
+ blocking: true
+ clean_flag: false
+ description: 'run OpenROADM device mixed versions tests suite'
+ run:
+ name: 'bashfeature'
+ args:
+ cmd: 'cd /src/transportpce && tox -e buildcontroller,build_karaf_tests_hybrid,tests_hybrid'
+ console: true
+ -
+ name: combined
order: 1
- description: ''
+ description: 'combine all transportPCE tests'
testcases:
-
- case_name: pre-commit
+ case_name: combined
project_name: transportpce
criteria: 100
blocking: true
clean_flag: false
- description: ''
+ description: 'run all transportPCE tests in parallell with tox'
run:
name: 'bashfeature'
args:
- cmd: 'cd /src/transportpce && tox -e pre-commit'
+ cmd: 'cd /src/transportpce && git apply tests/Xtesting/patch.diff && tox -o -p auto'
console: true