示例#1
0
def _load_metadata(force_reload=False):
    """Load metadata information into memory.

    If force_reload, the metadata information will be reloaded
    even if the metadata is already loaded.
    """
    adapter_api.load_adapters_internal(force_reload=force_reload)
    global OS_FIELDS
    if force_reload or OS_FIELDS is None:
        OS_FIELDS = _get_os_fields_from_configuration()
    global PACKAGE_FIELDS
    if force_reload or PACKAGE_FIELDS is None:
        PACKAGE_FIELDS = _get_package_fields_from_configuration()
    global FLAVOR_FIELDS
    if force_reload or FLAVOR_FIELDS is None:
        FLAVOR_FIELDS = _get_flavor_fields_from_configuration()
    global OSES_METADATA
    if force_reload or OSES_METADATA is None:
        OSES_METADATA = _get_oses_metadata_from_configuration()
    global PACKAGES_METADATA
    if force_reload or PACKAGES_METADATA is None:
        PACKAGES_METADATA = _get_packages_metadata_from_configuration()
    global FLAVORS_METADATA
    if force_reload or FLAVORS_METADATA is None:
        FLAVORS_METADATA = _get_flavors_metadata_from_configuration()
    global OSES_METADATA_UI_CONVERTERS
    if force_reload or OSES_METADATA_UI_CONVERTERS is None:
        OSES_METADATA_UI_CONVERTERS = (
            _get_oses_metadata_ui_converters_from_configuration())
    global FLAVORS_METADATA_UI_CONVERTERS
    if force_reload or FLAVORS_METADATA_UI_CONVERTERS is None:
        FLAVORS_METADATA_UI_CONVERTERS = (
            _get_flavors_metadata_ui_converters_from_configuration())
示例#2
0
def _load_metadata(force_reload=False):
    """Load metadata information into memory.

    If force_reload, the metadata information will be reloaded
    even if the metadata is already loaded.
    """
    adapter_api.load_adapters_internal(force_reload=force_reload)
    global OS_FIELDS
    if force_reload or OS_FIELDS is None:
        OS_FIELDS = _get_os_fields_from_configuration()
    global PACKAGE_FIELDS
    if force_reload or PACKAGE_FIELDS is None:
        PACKAGE_FIELDS = _get_package_fields_from_configuration()
    global FLAVOR_FIELDS
    if force_reload or FLAVOR_FIELDS is None:
        FLAVOR_FIELDS = _get_flavor_fields_from_configuration()
    global OSES_METADATA
    if force_reload or OSES_METADATA is None:
        OSES_METADATA = _get_oses_metadata_from_configuration()
    global PACKAGES_METADATA
    if force_reload or PACKAGES_METADATA is None:
        PACKAGES_METADATA = _get_packages_metadata_from_configuration()
    global FLAVORS_METADATA
    if force_reload or FLAVORS_METADATA is None:
        FLAVORS_METADATA = _get_flavors_metadata_from_configuration()
    global OSES_METADATA_UI_CONVERTERS
    if force_reload or OSES_METADATA_UI_CONVERTERS is None:
        OSES_METADATA_UI_CONVERTERS = (
            _get_oses_metadata_ui_converters_from_configuration()
        )
    global FLAVORS_METADATA_UI_CONVERTERS
    if force_reload or FLAVORS_METADATA_UI_CONVERTERS is None:
        FLAVORS_METADATA_UI_CONVERTERS = (
            _get_flavors_metadata_ui_converters_from_configuration()
        )
示例#3
0
 def __init__(self):
     self.config = setting
     self.code = 1
     self.messages = []
     self.dist, self.version, self.release = health_check_utils.get_dist()
     adapter_api.load_adapters_internal()
     self.os_installer = self._get_os_installer()
     self.package_installer = self._get_package_installer()