This file is indexed.

/usr/lib/python3/dist-packages/provisioningserver/rackdservices/image.py is in python3-maas-provisioningserver 2.4.0~beta2-6865-gec43e47e6-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Copyright 2015 Canonical Ltd.  This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).

"""Twisted Application Plugin for the MAAS Boot Image server"""

__all__ = [
    "BootImageEndpointService",
    ]

from provisioningserver.utils.twisted import reducedWebLogFormatter
from twisted.application.internet import StreamServerEndpointService
from twisted.web.resource import Resource
from twisted.web.server import Site
from twisted.web.static import File


class BootImageEndpointService(StreamServerEndpointService):
    """Service for serving images to the TFTP server via HTTP

    :ivar site: The twisted site resource

    """

    def __init__(self, resource_root, endpoint):
        """
        :param resource_root: The root directory for the Image server.
        :param endpoint: The endpoint on which the server should listen.

        """
        resource = Resource()
        resource.putChild(b'images', File(resource_root))
        self.site = Site(resource, logFormatter=reducedWebLogFormatter)
        super(BootImageEndpointService, self).__init__(endpoint, self.site)