summaryrefslogtreecommitdiffstats
path: root/adapters/mso-openstack-adapters/src/main/java/db/migration
AgeCommit message (Collapse)AuthorFilesLines
2019-02-04cloud config migration from openstack to catdbBenjamin, Max (mb388a)2-323/+0
remove the wait and sleep code in migration move cloud config migration from openstack to catdb Change-Id: Id887a37ce12665e5d8a604308ea251744529491c Issue-ID: SO-1461 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2019-02-01add in a retry function for cloud config migrationBenjamin, Max (mb388a)1-1/+16
add in a retry function into cloud config migration Change-Id: Iee5dd2ece0262cc7087021b567d9661e0ef91d72 Issue-ID: SO-1457 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-12-07Fix cloud Migration to read update config propertyKalkere Ramesh, Sharan (sk720x)1-1/+1
Fix cloud Migration to read update config property Change-Id: I143f654b62c83aaf19b9c8bd076fb3878967f120 Issue-ID: SO-1299 Signed-off-by: Kalkere Ramesh, Sharan (sk720x) <sk720x@att.com>
2018-12-05Resolve Security ExploitsSmokowski, Steve (ss835w)1-2/+5
normalize all file paths before using them Change-Id: I67aaa00d7218b95dde96f3679efe92c3c0cd33f9 Issue-ID: SO-1275 Signed-off-by: Smokowski, Steve (ss835w) <ss835w@us.att.com>
2018-11-05Catchup commits for DublinBenjamin, Max (mb388a)1-32/+0
added property for retry timer multiplier for testing Infra APIH table, fixed test assertNull condition. Infra APIH table, added tests for request-url = null. Infra APIH should write request_url to infra_active_requests. Return SelfLink URL on ServiceInstantiation SyncResponse. Added JUNITS. Added helper method to get AAI ResourceUri to faciliate unit test. Fixed code to correctly extract related generic vnf or vce id. updated unit test coverage for update network Handle REST NotFoundException for serviceInstance nodes query. Process should continue for new order request and throw exception only for SUPP request. Added disconnect functionality to the gw vnf test tool. Added conversion of vnf management option to dhv change speed sync subnet status with network update updated macroData vol assigned delete continue script Correct the name of DeleteVfModuleBB subprocess. fix the custom resolver to not convert int in string to int Write the returned value from Homing to gBBInput Use explicit conversion to JSON to read cloudConfiguration settings. added property for retry timer multiplier for testing avoid storing AAI yang models in execution added handlingCode to rollback test in workflowactionbb passed in alacarte flag to execute layer for rainy day added test cases for RollbackToAssigned rainy day hand added rollback to assign in catalog db rainy day hand Updated vnf adapter delete stubs to be a post for test. Added a javadoc to basic auth override method Added a check to not add blank headers to the headerMap in httpClient. Added check for if entity exist before calling readEntity. Fixed failing junits and updated way the body is obtained Added missing import statement for http client. Fixed mistakes and made updates caught during review. Removed post and httpPost methods from RESTClient and refactored references Refactored multiple http post references to use httpClient instead. Removed close connection method and randomized port in unit test Added http client unit test, coverage is currently at 90 percent Resolve conflict in sdnc adapter reste v1 method Began removing http delete and delete methods from RESTClient and aaiUtil. Removed http put method and executeput method, refactored references. fixed broken tests in the branch in jenkins build Fix Springboot 2.0 start up issues, and other issues added in implementation to generate self link if there isnt one removed dbcp2 from poms that still had them added rollbackstatusmessage to stub in testprocess added rollback_status_message to the schema sql file Added variable for rollbackStatusMessage Added rollbackStatusMessage to get response added rollback status message to archived infra request set rollback status message to successful on boolean added logic to split rollback and regular error message added rollback status message to infra active requests pushing the cloud config changes as well Added media type and fixed cast plural issue. Made various updated and fixes to code that was changed. Removed all no longer used RESTClient imports from classes Removed and refactored references for aaiUtil methods and all remaining RESTClient methods, removed RESTClient project and updated poms. Return canonical stack id on multicloud create Fix OOF Config Ingestion Fix variable to retrieve sdnc endpoint Prepare resources for service uuid req Fix swapped parameters for multicloud DELETE Update msb-java-sdk to resolve license issues cloud owner support for SDNC interface correlationId is now read from userParams Fix up request body of multicloud adapter body removed LinkedHashMap<?,?> from java classes Cut over logging project to release not snapshot Update unit tests, revert test code, fix comments Fix remaining number of Unit Tests, on avpn flow Fix JUNITS add callback url, fix BPMN issues Update SDNC interaction to support a-sync updated bpm assert import and corrected tests updated test case to be mockito 2 compliant additional changes to import statements and tests Change the place where the data for multistage gets set Update treatment of PENDING_ACTIVATION VF_MODULE CREATE entries to SILENT_SUCCESS to support first stage of multistage. Implement second stage of multistage design VF Module Creation removed LinkedHashMap<?,?> from java classes Removed SNAPSHOT from dependency Cut over logging project to release not snapshot Fixed failing BBInputSetup tests Update unit tests, revert test code, fix comments Updated apih tests to use networkInstanceGroup Updated ModelType enum and fixed compilation issues Fix remaining number of Unit Tests, on avpn flow Fix JUNITS add callback url, fix BPMN issues Implementation of the first stage of multistage design for VF Module creation. Update SDNC interaction to support a-sync no longer leave modified files after test runs Remove generated CSAR, that occurs during JUNIT Update Camunda Pods to use Flyway Migration in 1902 Updated hashcode method and removed comment. Added aggregate routes to the sdnw request and updated pom sdnw dependency. Began to set aggreagate route information for vrf configuration. modified remaining files with att-aic references Correct rollbackData setting and protect against potential null objects. correct AAIObjectPlurals enum value name Update POJO to use type URL for selfLink. Optional<URL> - construct SelfLink Url format. Construct SelfLink Url format from full Url. added missing properties to application-test.yaml fixed compliation error after merge of unit test restored files which should not have been deleted Fix SO vulnerabilities with cxf Fixing bpmn infra endpoint in so-monitoring yaml removed att-aic from codebase default cloud owner now configurable Set homingService in WorkflowAction Fix Java Ex in Homing Version should be 1.3.1 to release new dockers Pnf Spring Environment correction test property now has dynamic wiremock port removed test specific wiremock rule that was causing problems re-enabled and corrected integration tests for so-bpmn-tasks Test to get sniro homing v2 test working by splitting test suites for each spring application Reverted changes to old migration scripts.. Fixed spring context issue with test HomingV2. Removed unused import to fix compilation errors Fixed onap changes to homing, migrated homingV2 to homingBB, fixed broken junits again. - Updated isUseHttpsWithDmaapTest to check assertTrue rather than assertFalse. - Upgraded code to make the isUseHttpsWithDmaap configurable. It will default to true if no value is found in the config file. moved workflowaction test class to the test section added status message update for retry and rollback beefed up error message debug logging and req db msg added debug lines to workflowactionbbtasks reqdbcall Issue-ID: SO-1187 Change-Id: Iec1aff4ed30a43c0e0b2cdb06c28d8db8a99a830 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-11-05Springboot 2.0 upgradeBenjamin, Max (mb388a)1-0/+5
corrected typo in CloudConfiguration class removed files which should not have been merged updated gr api test cases with dynamic cloud owner updated groovy files to allow for dynamic cloud owner values moved VFModularity folder to mso-infrastructure bpmn updated GR API layer to include cloud owner added enum for default cloud owner - fixing junit test cases for using catalogDb client r2 - fixing junit test cases for using catalogDb client - Internal review comments incorporated for merging mocking into BaseTest - Internal review comments incorporated for removing direct repo calls - CLONE - Key Management Hardcoded encryption key | fixing junits - CLONE - Key Management Hardcoded encryption key Updated builder to use String.format Added exception specifically for issues interacting with requestdbadapter Updated exception message and added junit test case removed useless error handling test case from workflow changed method name and added junit coverage to errors added max retry and success status after completed bb Added case to handle when homing is not called during assign vnf. Fixing fortify issues | Implementing review comments - Key Management Hardcoded encryption key - fixing prop files - Key Management Hardcoded encryption key include network ID for completion handler Added exception handling for saving to requestdb - Adding a check on the predicate availability on the repository before firing the query with default conditions. This ensures that the api returns data only when there is an input against which it was able to form some conditions Modify UT to show that the API does not behave - adding negative test case for checkInstanceNameDuplicate added assertion that global count var was reset to 0 updated rollback to reset current sequence count var workflowaction calls rollback is complete before error workflowaction will set failure on successful rollback added check for isrollback to know which complete to call removed file which should not have been added add fabric check before running vf module a la carte Enhance UCPEMigrateService junits and add them to Jenkins build.. Added back removed test case for ManualTasks Added test case for response error Added rainy day test cases for ManualTasks revert the other change and fix the rollback logic instead fixed current sequence and updated rollback code added network cloud heat template parameters to mapper Generate a unique subRequestId for each request to APP-C. reverted conditional logic for determining fabric Fix Bean scanning so it picks up the resttemplate removed unnecessary RestTemplate Bean configurations removed file which should not have been added workflowaction calls rollback is complete before error workflowaction will set failure on successful rollback added check for isrollback to know which complete to call add fabric check before running vf module a la carte added assertion that global count var was reset to 0 updated rollback to reset current sequence count var include network ID for completion handler Revert Application.yaml change accidentally checked in Added exception handling for saving to requestdb Added case to handle when homing is not called during assign vnf. removed useless error handling test case from workflow changed method name and added junit coverage to errors ... add cloud owner variable to camunda in mapping Revert "Pass cloudOwner to subflow DoCreateVfModuleVolumeV2. Added juint test to verify variables are set in the execution. Set default cloudOwner in main module CreateVfModuleVolumeInfraV2" updated cloud configuration pojo to inlcude defaults Revert "Test to verify ServiceInstance object mapping" Test to verify ServiceInstance object mapping Pass cloudOwner to subflow DoCreateVfModuleVolumeV2. Added juint test to verify variables are set in the execution. Set default cloudOwner in main module CreateVfModuleVolumeInfraV2 Pass cloudOwner to subflow DoCreateVfModuleVolumeV2. Set default cloudOwner 'att-aic' if null per old requirements. removed references to att-aic from BBInputSetup Changes done in encryption decryption logic | used DelegateExecutionFake in Tests Changes done in encryption decryption logic | used DelegateExecutionFake in Tests Changes done in encryption decryption logic Changes done in encryption decryption logic | removed Default Auth Constant as per the comments Changes done in encryption decryption logic | Fixed UT Changes done in encryption decryption logic | Added XmlComparator assertion for verifying XML Changes done in encryption decryption logic | Reverted as per the review comment Changes done in encryption decryption logic | Fixed UTs Changes done in encryption decryption logic | Fixed UTs Changes done in encryption decryption logic | modified related encrypted properties in test yaml files Changes done in encryption decryption logic for fortify issue resolution | Fixed UTs Changes done in encryption decryption logic | modified related encrypted properties in yaml files Changes done in encryption decryption logic for fortify issue resolution. Fixed Property fetching issue in required file Added TasksBeansTest using openpojo Removed renamed test file from tasksbeans Updated imports on TasksBeansTest Added openpojo test to replace the individual tests Removed tests that provided no coverage script clean up -Update reference data to support distinct recreate and replace requests with their own sequences Update reference data to support distinct recreate and replace requests with their own sequences- Fix seq number Update reference data to support distinct recreate and replace requests with their own sequences added null check to mdc and interceptors to sdnc cxf validations can now match against multiple BBs reverted changes to BBInputSetup class added support for pre and post validation for BBs initial commit of generic building block validator converted test to no longer be a springboot test Remove cosmetic changes from BPMN files to be consistent. Remove minor changes that are not related to functionality. Rework to implement the functionality as part of Validator Combine the verification methods into one based on the flow's name; change the logging. Add verification of status of other VF Modules in the VNF for the delete/deactivate/unassign. added network-technology validation for CreateNetworkBB Sonar Issue Fix | Changes done in encryption decryption logic | Refactoring Changes done in encryption decryption logic| Used AES/GCM/NoPadding algorithm | fixed sonar issues added network-type and network-technology to mapper Continue the fight to make JUNITS work properly Update ASDC ATT to be springboot 2.0 compliant Continue to fix Unit tests for springboot 2.0 port removed autowired from workflowactionbbtaskstest fixed workflowactiontest and reduced size by 500 lines Update last of UT for mockito upgrade to 2.0 Fix more JUNITS due to mockito 2.0 upgrade Unit Test fixes to use proper mockito not spring Update Base Test to import proper packages for compile Additional Springboot 2.0 changes, for tests Additional springboot 2.0 fixes and upgrades Update Migration to be Flyway 5 Compliant Fix MSOBPMN Infrastructure common tests Fix Groovy Unit Tests in CommonBPMN Project Update MSO common BPMN to Springboot 2.0 Upgrade ASDC controller to SpringBoot 2.0 Port Openstack adapters to springboot 2.0 Fix VFC Adapter to be springboot 2 compatible Port CatalogDB adapter code to springboot 2 Port SDNC Adapter to Springboot 2.0 ... added update scripts to macro data instead of v12 sql added secondarypolicy to rainy day handling table confirm subnet map is not null in adapter response shallow copy subnet before AAI udpate update AAIObjectType to use uriTemplate extract subnet data from adapter response update correct AAIObjectType for subnet query update subnet(s) in AAI on network create completion confirm subnet map is not null in adapter response shallow copy subnet before AAI udpate update AAIObjectType to use uriTemplate extract subnet data from adapter response update correct AAIObjectType for subnet query update subnet(s) in AAI on network create completion fixed test http entity unit test to remove testing appid and transaction id added unit test for querySubsystemHealth method. also added resttemplate mock to implement healthcheck endpoint fixed unit test to use mock instead of actually goes out to health check endpoint added code to extend globalhealthcheck to include pinging other components and consolidate the responses converted test to no longer be a springboot test Remove cosmetic changes from BPMN files to be consistent. Remove minor changes that are not related to functionality. added update scripts to macro data instead of v12 sql Rework to implement the functionality as part of Validator added secondarypolicy to rainy day handling table added network-type and network-technology to mapper Combine the verification methods into one based on the flow's name; change the logging. Add verification of status of other VF Modules in the VNF for the delete/deactivate/unassign. updated how request db is set to failure in workflowA corrected code to match existing unit tests corrected tests after springboot 2 upgrade Added Required UTs in UpdateConfigurationStateTest and also fixed some UTs. added in missing parenthesis on method call added back execution variable for allotted uri addressed comments on pull request refactor AAI Rest calls from groovy files - Changes as per review comments checkin to refactor AAI rest | Fixing AAIResourceClient.update call refactor AAI Rest calls from groovy files - UpdateConfiguration refactor AAI Rest calls from groovy file - DeleteConfiguration refactor AAI Rest calls from groovy file - UpdateConfiguration refactor AAI Rest calls from groovy file - CreateConfiguration & ConfigurationUtils refactor AAI Rest calls from groovy files - Fix getARByID issue checkin to refactor AAI rest | Adding Junits checkin to refactor AAI rest | Adding few more classes checkin to refactor AAI rest of DoCreateVfModuleVolumeV2 checkin to refactor AAI rest | Update junit checkin to refactor AAI rest of DoCreateVfModuleVolumeV2 | Adding junits checkin to refactor AAI rest of DoCreateVfModuleVolumeV2 | Adding junits checkin to refactor AAI rest of DoCreateVfModuleVolumeV2.groovy ... updated in and out mapping to be generalBuildingBlock change source out mapping to generalBuildingBlock Change-Id: I122f1ebe3e15b77da0a55af201d89d47e326bf83 Issue-ID: SO-1098 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-09-08added generic fabric support to SOBenjamin, Max (mb388a)3-0/+60
Fix Autoincrement of ID field in table Fix accidental removal of method Update usage of requestdb client removed unused imports in common tasks and test Fix broken branch, have unit tests pass references the Epic branch Fix broken branch from compiling committing classpath for vfc adapter cause its not going away added in the fail case for when there are no profiles removed second set of adapters in application test yml removed double adapters in request db application test added jpa repo dependency to the so bpmn folder pom add creation timestamp column to the table added in null checks for Config returned from policy switched to string in requestprocess with jenerate switched to string in requestprocess with jenerate updated aai version in common pom to 605 from 591 renamed the db scripts for flyway sync to register added endpoint to application test yml for failing test ... Change-Id: I800f837ea75d7cdff740dc3a387e4d7654cfd085 Issue-ID: SO-972 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
2018-09-04fixed sonar issue in V4_2__DummyMigration.javaSandeep J1-1/+1
fixed sonar issue detailed in SO-966 Issue-ID: SO-966 Change-Id: Ib9b4cd7815d63b380c90b4c1dece444c735d5757 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-08-30fixed sonar issue in R__CloudConfigMigration.javaSandeep J1-3/+1
fixed sonar issues mentioned in Jira ticket SO-931 Issue-ID: SO-931 Change-Id: I31ec20e4958a11f25050eadd42ce0edc56e042d4 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-08-27fixed sonar issue in R_CloudConfigMigration.javaSandeep J1-2/+2
fixed sonar issue: Remove the declaration of thrown exception 'com.fasterxml.jackson.core.JsonParseException' which is a subclass of 'java.io.IOException: line 81 Issue-ID: SO-906 Change-Id: If18c2b6e0769d95dc56c9dbac5c1d5219e95955c Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-08-23fix sonar critcal issues in R_CloudConfigMigrationSandeep J1-4/+8
added specific excpetions instead of generic ones Issue-ID: SO-886 Change-Id: Ib0f2e655a6e58b8dc142233679a53c15b373f117 Signed-off-by: Sandeep J <sandeejh@in.ibm.com>
2018-08-22Merge "sonar try-with-resources"Seshu Kumar M1-6/+6
2018-08-21openstack_adapter container fails to startRob Daugherty1-8/+32
The reported problem occurs because the openstack-adapters app is attempting to do a migration on top of a migration already performed by the catalog-db app. I'm adding these options to flyway in openstack-adapters: baseline-on-migrate: true validate-on-migrate: false Another issue is that the java-based CloudConfig migration class was looking for CloudConfig data only in the application.yaml file in the classpath. It was not looking for CloudConfig data in the override file. I've changed this logic to look in the override file first and then in application.yaml. Ideally, these sources would be merged, but I don't see a reasonable way to do it. Change-Id: I7ba07c1f8f00b4c628e825393ee31502950fe592 Issue-ID: SO-868 Signed-off-by: Rob Daugherty <rd472p@att.com>
2018-08-21sonar try-with-resourcesArindam Mondal1-6/+6
Issue-ID: SO-871 Change-Id: I151ea890755c0a9dd9e7f5df1ed807a660fb0c2f Signed-off-by: Arindam Mondal <arind.mondal@samsung.com>
2018-08-13Cloud config database table supportBenjamin, Max (mb388a)3-0/+246
added cloud config database entities added cloud config repository converted existing cloud config class converted all code interacting with previous cloud config object created migration to automatically load cloud config properties from application.yaml Issue-ID: SO-854 Change-Id: Icf408e5d0fcabd1b7e97298963c555fae6964930 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>