def get_current_metadata(self) -> Metadata:
    '\n        Calculate the current metadata.\n\n        Takes the default, static metadata based on the config and system\n        information. It then overlays data from other sources in a priority order,\n        whereby each source has a set of permitted attributes in the metadata that\n        can be overridden.\n        '
    metadata_sources: List[Tuple[(Set[str], Dict[(str, str)])]] = [(self.CACHED_ATTRS, self._cache.data), (self.MUTABLE_ATTRS_BY_REQUEST, self._requested_data)]
    for (disk_type, val) in self._lifecycles.items():
        if (val is not None):
            metadata_sources.append((self.DISK_TYPE_OVERRIDE_MAP[disk_type], val.diff_data))
    metadata = Metadata.init(self.config)
    for (permitted_attrs, diff_data) in metadata_sources:
        for (k, v) in diff_data.items():
            if (k in permitted_attrs):
                metadata.__setattr__(k, v)
            else:
                LOGGER.warning(f'There was an attempt to mutate {k}, but it was not permitted.')
    for key in self.CACHED_ATTRS:
        self._cache.update_cached_attr(key, metadata.__getattribute__(key))
    return metadata
Calculate the current metadata.

Takes the default, static metadata based on the config and system
information. It then overlays data from other sources in a priority order,
whereby each source has a set of permitted attributes in the metadata that
can be overridden.
def get_current_metadata(self) -> Metadata:
    '\n        Calculate the current metadata.\n\n        Takes the default, static metadata based on the config and system\n        information. It then overlays data from other sources in a priority order,\n        whereby each source has a set of permitted attributes in the metadata that\n        can be overridden.\n        '
    metadata_sources: List[Tuple[(Set[str], Dict[(str, str)])]] = [(self.CACHED_ATTRS, self._cache.data), (self.MUTABLE_ATTRS_BY_REQUEST, self._requested_data)]
    for (disk_type, val) in self._lifecycles.items():
        if (val is not None):
            metadata_sources.append((self.DISK_TYPE_OVERRIDE_MAP[disk_type], val.diff_data))
    metadata = Metadata.init(self.config)
    for (permitted_attrs, diff_data) in metadata_sources:
        for (k, v) in diff_data.items():
            if (k in permitted_attrs):
                metadata.__setattr__(k, v)
            else:
                LOGGER.warning(f'There was an attempt to mutate {k}, but it was not permitted.')
    for key in self.CACHED_ATTRS:
        self._cache.update_cached_attr(key, metadata.__getattribute__(key))
    return metadata