def _image_ref_from_req_data(self, data):
        try:
            return six.text_type(data['server']['imageRef'])
        except (__HOLE__, KeyError):
            msg = _("Missing imageRef attribute")
            raise exc.HTTPBadRequest(explanation=msg)
dataset/ETHPy150Open BU-NU-CLOUD-SP16/Trusted-Platform-Module-nova/nova/api/openstack/compute/legacy_v2/servers.py/Controller._image_ref_from_req_data