hooks/hooks.py
def install_packages():
    """Installs necessary packages for the ceph-radosgw service.

    Calling this method when the source config value has changed
    will cause an upgrade of ceph packages to be performed.

    :returns: whether packages were installed or not
    :rtype: boolean
    """
    pkgs_installed = False
    c = config()
    if c.changed('source') or c.changed('key'):
        add_source(c.get('source'), c.get('key'))
        apt_update(fatal=True)

    # NOTE: just use full package list if we're in an upgrade
    #       config-changed execution
    pkgs = (
        PACKAGES if upgrade_available() else
        filter_installed_packages(PACKAGES)
    )
    if pkgs:
        status_set('maintenance', 'Installing radosgw packages')
        if ('apache2' in pkgs):
            # NOTE(lourot): Apache's default config makes it listen on port 80,
            # which will prevent HAProxy from listening on that same port. We
            # use Apache in this setup however for SSL (different port). We
            # need to let Apache free port 80 before we can install HAProxy
            # otherwise HAProxy will crash. See lp:1904411
            log('Installing Apache')
            apt_install(['apache2'], fatal=True)
            disable_unused_apache_sites()
        apt_install(pkgs, fatal=True)
        pkgs_installed = True

    pkgs = filter_missing_packages(APACHE_PACKAGES)
    if pkgs:
        apt_purge(pkgs)

    return pkgs_installed
Installs necessary packages for the ceph-radosgw service.

    Calling this method when the source config value has changed
    will cause an upgrade of ceph packages to be performed.

    :returns: whether packages were installed or not
    :rtype: boolean
    
Installs necessary packages for the ceph-radosgw service.
Calling this method when the source config value has changed
will cause an upgrade of ceph packages to be performed.
Installs necessary packages for the ceph - radosgw service . Calling this method when the source config value has changed will cause an upgrade of ceph packages to be performed .
def install_packages():
    pkgs_installed = False
    c = config()
    if c.changed('source') or c.changed('key'):
        add_source(c.get('source'), c.get('key'))
        apt_update(fatal=True)
    pkgs = (
        PACKAGES if upgrade_available() else
        filter_installed_packages(PACKAGES)
    )
    if pkgs:
        status_set('maintenance', 'Installing radosgw packages')
        if ('apache2' in pkgs):
            log('Installing Apache')
            apt_install(['apache2'], fatal=True)
            disable_unused_apache_sites()
        apt_install(pkgs, fatal=True)
        pkgs_installed = True
    pkgs = filter_missing_packages(APACHE_PACKAGES)
    if pkgs:
        apt_purge(pkgs)
    return pkgs_installed
def install_packages ( ) : pkgs_installed = False c = config ( ) if c . changed ( 'source' ) or c . changed ( 'key' ) : add_source ( c . get ( 'source' ) , c . get ( 'key' ) ) apt_update ( fatal = True ) pkgs = ( PACKAGES if upgrade_available ( ) else filter_installed_packages ( PACKAGES ) ) if pkgs : status_set ( 'maintenance' , 'Installing radosgw packages' ) if ( 'apache2' in pkgs ) : log ( 'Installing Apache' ) apt_install ( [ 'apache2' ] , fatal = True ) disable_unused_apache_sites ( ) apt_install ( pkgs , fatal = True ) pkgs_installed = True pkgs = filter_missing_packages ( APACHE_PACKAGES ) if pkgs : apt_purge ( pkgs ) return pkgs_installed
Installs necessary packages for the ceph-radosgw service.
Installs necessary packages for the ceph - radosgw service .
"""Installs necessary packages for the ceph-radosgw service.

    Calling this method when the source config value has changed
    will cause an upgrade of ceph packages to be performed.

    :returns: whether packages were installed or not
    :rtype: boolean
    """ # NOTE: just use full package list if we're in an upgrade #       config-changed execution # NOTE(lourot): Apache's default config makes it listen on port 80, # which will prevent HAProxy from listening on that same port. We # use Apache in this setup however for SSL (different port). We # need to let Apache free port 80 before we can install HAProxy # otherwise HAProxy will crash. See lp:1904411
whether packages were installed or not
whether packages were installed or not
boolean