Пример #1
0
 def test_carbon_int(self):
     """Test Carbon major version as int gives Karaf 3 prefix."""
     distro_prefix = lib.get_distro_name_prefix(6)
     self.assertEqual(distro_prefix, self.k3_distro_prefix)
Пример #2
0
 def test_oxygen_int(self):
     """Test Oxygen major version as int gives Karaf 4 prefix."""
     distro_prefix = lib.get_distro_name_prefix(8)
     self.assertEqual(distro_prefix, self.k4_distro_prefix)
Пример #3
0
    else:
        build.update({"sysd_commit": lib.get_sysd_commit()})

    # Argparse rules imply args.major will only be present for latest_snap
    # builds and args.download_url will only be present for generic builds.
    # If doing a latest-snap build, find latest build tarball URL for given
    # major version and add to build definition. Else, add URL directly.
    if hasattr(args, "major"):
        build.update({"download_url": lib.get_snap_url(args.major)})
    else:
        build.update({"download_url": args.download_url})

    # Use download_url to find pkg version, add to build def
    build.update(lib.extract_version(build["download_url"]))

    # Karaf 3 distros use distribution-karaf-, Karaf 4 uses karaf-
    build.update({
        "distro_name_prefix":
        lib.get_distro_name_prefix(build['version_major'])
    })

    # Update build definition with Java version required by ODL version
    build.update(
        {"java_version": lib.get_java_version(build['version_major'])})

    # Use package-specific helper logic to do the specified build
    if args.rpm:
        rpm_lib.build_rpm(build)
    elif args.deb:
        deb_lib.build_deb(build)
Пример #4
0
 def test_nitrogen(self):
     """Test Nitrogen major version gives Karaf 4 prefix."""
     distro_prefix = lib.get_distro_name_prefix("7")
     self.assertEqual(distro_prefix, self.k4_distro_prefix)
Пример #5
0
    # Argparse rules imply args.major will only be present for latest_snap
    # builds and args.download_url will only be present for generic builds.
    # If doing a latest-snap build, find latest build tarball URL for given
    # major version and add to build definition. Else, add URL directly.
    if hasattr(args, "major"):
        build.update({"download_url": lib.get_snap_url(args.major)})
    else:
        build.update({"download_url": args.download_url})

    # Use download_url to find pkg version, add to build def
    build.update(lib.extract_version(build["download_url"]))

    # Override automatically extracted package version with param if passed
    if (hasattr(args, "pkg_version") and args.pkg_version is not None and
            args.pkg_version is not ""):
        build['pkg_version'] = args.pkg_version

    # Karaf 3 distros use distribution-karaf-, Karaf 4 uses karaf-
    build.update({"distro_name_prefix": lib.get_distro_name_prefix(
        build['version_major'], build['download_url'])})

    # Update build definition with Java version required by ODL version
    build.update({"java_version": lib.get_java_version(
        build['version_major'])})

    # Use package-specific helper logic to do the specified build
    if args.rpm:
        rpm_lib.build_rpm(build)
    elif args.deb:
        deb_lib.build_deb(build)
Пример #6
0
 def test_k3_norm_release_carbon(self):
     """Test normal K3 URL gives distro prefix based on Karaf version."""
     distro_prefix = lib.get_distro_name_prefix(6, self.k3_distro_url)
     self.assertEqual(distro_prefix, self.k3_distro_prefix)
Пример #7
0
 def test_k4_norm_release_oxygen(self):
     """Test normal K4 URL gives distro prefix based on Karaf version."""
     distro_prefix = lib.get_distro_name_prefix(9, self.k4_distro_url)
     self.assertEqual(distro_prefix, self.k4_distro_prefix)
Пример #8
0
 def test_managed_release_fluorine(self):
     """Test Managed Release URL gives MR distro prefix."""
     distro_prefix = lib.get_distro_name_prefix(9, self.mrel_distro_url)
     self.assertEqual(distro_prefix, self.mrel_distro_prefix)
Пример #9
0
 def test_fluorine_int(self):
     """Test Fluorine major version as int gives Karaf 4 prefix."""
     distro_prefix = lib.get_distro_name_prefix(9)
     self.assertEqual(distro_prefix, self.k4_distro_prefix)