Ejemplo n.º 1
0
    def openstack_upgrade_available(self, package=None):
        """Check if an OpenStack upgrade is available

        :param package: str Package name to use to check upgrade availability
        :returns: bool
        """
        if not package:
            package = self.release_pkg

        src = self.config['openstack-origin']
        cur_vers = self.get_os_version_package(package)
        avail_vers = os_utils.get_os_version_install_source(src)
        apt.init()
        return apt.version_compare(avail_vers, cur_vers) == 1
Ejemplo n.º 2
0
    def openstack_upgrade_available(self, package=None):
        """Check if an OpenStack upgrade is available

        :param package: str Package name to use to check upgrade availability
        :returns: bool
        """
        if not package:
            package = self.release_pkg

        src = self.config['openstack-origin']
        cur_vers = self.get_os_version_package(package)
        avail_vers = os_utils.get_os_version_install_source(src)
        apt.init()
        return apt.version_compare(avail_vers, cur_vers) == 1
Ejemplo n.º 3
0
    def openstack_upgrade_available(self, package=None, snap=None):
        """Check if an OpenStack upgrade is available

        :param package: str Package name to use to check upgrade availability
        :returns: bool
        """
        if not package:
            package = self.release_pkg
        if not snap:
            snap = self.release_snap

        src = self.config[self.source_config_key]
        cur_vers = self.get_os_version_package(package)
        avail_vers = os_utils.get_os_version_install_source(src)
        if os_utils.snap_install_requested():
            cur_vers = self.get_os_version_snap(snap)
        else:
            cur_vers = self.get_os_version_package(package)
        apt.init()
        return apt.version_compare(avail_vers, cur_vers) == 1
Ejemplo n.º 4
0
 def test_os_version_from_install_source(self, codename, version):
     codename.return_value = 'grizzly'
     openstack.get_os_version_install_source('cloud:precise-grizzly')
     version.assert_called_with('grizzly')