diff options
author | Michael Dürre <michael.duerre@highstreet-technologies.com> | 2024-03-14 07:48:48 +0100 |
---|---|---|
committer | Dan Timoney <dtimoney@att.com> | 2024-08-16 12:32:19 -0400 |
commit | d4313f3f621c6bcbf4109b20245f722a3e9b6b8d (patch) | |
tree | 693c72b4a329aaf952a6153ff45d25e4a12e7acf /tools | |
parent | de82d6865fb7f50c9241eccd38803aa7f5a16b80 (diff) |
migrate parents to potassium-sr2
fix migrate script. update odl versions
Issue-ID: CCSDK-3990
Change-Id: I311a2445ffb8065cf13d2ab8fbf75986b6eba04f
Signed-off-by: Michael Dürre <michael.duerre@highstreet-technologies.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/lib/pomfile.py | 3 | ||||
-rwxr-xr-x | tools/migrateOdlParents.py | 24 |
2 files changed, 15 insertions, 12 deletions
diff --git a/tools/lib/pomfile.py b/tools/lib/pomfile.py index 88bfa90e..c73fbc82 100644 --- a/tools/lib/pomfile.py +++ b/tools/lib/pomfile.py @@ -35,10 +35,11 @@ class PomFile: # value: value to set def setXmlValue(self, valuePath, value, replaceMultiple=False) -> bool: if value is None: + print("unable to set {} to {} in {}: {}".format(valuePath, value, self.filename, str(False))) return False found=False pathToFind = XPath(valuePath) - pattern = re.compile('<([^>^\ ^?^!]+)') + pattern = re.compile('<([^>^\ ^?^!]+(\ \/)?)') curPath=XPath() curParent=None isComment=False diff --git a/tools/migrateOdlParents.py b/tools/migrateOdlParents.py index a7175b8b..124234ac 100755 --- a/tools/migrateOdlParents.py +++ b/tools/migrateOdlParents.py @@ -8,7 +8,7 @@ import tempfile from lib.pomfile import PomFile DEFAULT_PARENT_GROUPID="org.onap.ccsdk.parent" -DEFAULT_PARENT_VERSION="2.4.0-SNAPSHOT" +DEFAULT_PARENT_VERSION="2.7.0-SNAPSHOT" DEFAULT_STRICT=True USE_OLD_SERVLET_API=True @@ -94,8 +94,8 @@ class OdlParentMigrator: templatePom = PomFile(self.odlParentPath+'/setup/src/main/resources/pom-template.xml') - x = templatePom.setXmlValue('/project/properties/odl.controller.mdsal.version',mdsalVersion) - success = success and x + # x = templatePom.setXmlValue('/project/properties/odl.controller.mdsal.version',mdsalVersion) + # success = success and x x = templatePom.setXmlValue('/project/properties/odl.mdsal.version',odlBundleVersion) success = success and x x = templatePom.setXmlValue('/project/properties/odl.mdsal.model.version',odlBundleVersion) @@ -164,24 +164,26 @@ class OdlParentMigrator: bgpVersion = self.getMvnRepoVersion('org.opendaylight.bgpcep','topology-api') controllerVersion = self.getMvnRepoVersion('org.opendaylight.controller', 'blueprint') mdsalVersion=self.getMvnRepoVersion('org.opendaylight.mdsal','mdsal-binding-api') - netconfVersion = self.getMvnRepoVersion('org.opendaylight.netconf','netconf-impl') + netconfVersion = self.getMvnRepoVersion('org.opendaylight.netconf','netconf-api') pomFile = PomFile(os.path.abspath(self.parentPath+'/dependencies-odl-bom/pom.xml')) - x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=bgp-artifacts]/version',bgpVersion) + x = pomFile.setXmlValue('/project/version',self.version) + success = success and x + x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=bgpcep-artifacts]/version',bgpVersion) success = success and x x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=controller-artifacts]/version',controllerVersion) success = success and x x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=mdsal-artifacts]/version',mdsalVersion) success = success and x - x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=netconf-artifacts]/version',netconfVersion) - success = success and x - x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=sal-binding-broker-impl]/version',netconfVersion, True) - success = success and x + # x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=netconf-artifacts]/version',netconfVersion) + # success = success and x + # x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=sal-binding-broker-impl]/version',netconfVersion, True) + # success = success and x # at the moment not possible because of dependent variable in path after value to set # x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=sal-binding-broker-impl,type=test-jar]/version',netconfVersion) # success = success and x - x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=sal-test-model]/version',netconfVersion) - success = success and x + # x = pomFile.setXmlValue('/project/dependencyManagement/dependencies/dependency[artifactId=sal-test-model]/version',netconfVersion) + # success = success and x print("done" if success else "failed") return success |