def _read_layer_paths(self, old_image_config, old_image_manifest, layers_to_move):

        # In manifest.json we do not have listed all layers
        # but only layers that do contain some data.
        current_manifest_layer = 0

        layer_paths_to_move = []
        layer_paths_to_squash = []

        # Iterate over image history, from base image to top layer
        for i, layer in enumerate(old_image_config['history']):

            # If it's not an empty layer get the id
            # (directory name) where the layer's data is
            # stored
            if not layer.get('empty_layer', False):
                layer_id = old_image_manifest['Layers'][
                    current_manifest_layer].rsplit('/')[0]

                # Check if this layer should be moved or squashed
                if len(layers_to_move) > i:
                    layer_paths_to_move.append(layer_id)
                else:
                    layer_paths_to_squash.append(layer_id)

                current_manifest_layer += 1

        return layer_paths_to_squash, layer_paths_to_move
Returns the port the daemon is listening on.
dataset/ETHPy150Open goldmann/docker-squash/docker_squash/v2_image.py/V2Image._read_layer_paths--crossover with--dataset/ETHPy150Open ganeti/ganeti/lib/masterd/instance.py/DiskImport.listen_port