Search is not available for this dataset
repo
stringlengths
2
152
file
stringlengths
15
239
code
stringlengths
0
58.4M
file_length
int64
0
58.4M
avg_line_length
float64
0
1.81M
max_line_length
int64
0
12.7M
extension_type
stringclasses
364 values
null
ceph-main/src/python-common/ceph/__init__.py
0
0
0
py
null
ceph-main/src/python-common/ceph/utils.py
import datetime import re import string from typing import Optional def datetime_now() -> datetime.datetime: """ Return the current local date and time. :return: Returns an aware datetime object of the current date and time. """ return datetime.datetime.now(tz=datetime.timezone.utc) def...
3,614
28.153226
80
py
null
ceph-main/src/python-common/ceph/deployment/__init__.py
0
0
0
py
null
ceph-main/src/python-common/ceph/deployment/drive_group.py
import enum import yaml from ceph.deployment.inventory import Device from ceph.deployment.service_spec import ( CustomConfig, GeneralArgList, PlacementSpec, ServiceSpec, ) from ceph.deployment.hostspec import SpecValidationError try: from typing import Optional, List, Dict, Any, Union except Impor...
15,399
38.896373
123
py
null
ceph-main/src/python-common/ceph/deployment/hostspec.py
from collections import OrderedDict import errno import re from typing import Optional, List, Any, Dict def assert_valid_host(name: str) -> None: p = re.compile('^[a-zA-Z0-9-]+$') try: assert len(name) <= 250, 'name is too long (max 250 chars)' for part in name.split('.'): assert l...
4,681
32.927536
95
py
null
ceph-main/src/python-common/ceph/deployment/inventory.py
try: from typing import List, Optional, Dict, Any, Union except ImportError: pass # for type checking from ceph.utils import datetime_now, datetime_to_str, str_to_datetime import datetime import json class Devices(object): """ A container for Device instances with reporting """ def __init__...
4,965
34.726619
99
py
null
ceph-main/src/python-common/ceph/deployment/service_spec.py
import fnmatch import os import re import enum from collections import OrderedDict from contextlib import contextmanager from functools import wraps from ipaddress import ip_network, ip_address from typing import Optional, Dict, Any, List, Union, Callable, Iterable, Type, TypeVar, cast, \ NamedTuple, Mapping, Itera...
76,595
38.300154
100
py
null
ceph-main/src/python-common/ceph/deployment/translate.py
import logging try: from typing import Optional, List, Dict except ImportError: pass from ceph.deployment.drive_selection.selector import DriveSelection logger = logging.getLogger(__name__) # TODO refactor this to a DriveSelection method class to_ceph_volume(object): _supported_device_classes = [ ...
7,462
36.502513
103
py
null
ceph-main/src/python-common/ceph/deployment/utils.py
import ipaddress import socket from typing import Tuple, Optional from urllib.parse import urlparse def unwrap_ipv6(address): # type: (str) -> str if address.startswith('[') and address.endswith(']'): return address[1:-1] return address def wrap_ipv6(address): # type: (str) -> str # We ...
3,124
29.339806
86
py
null
ceph-main/src/python-common/ceph/deployment/drive_selection/__init__.py
from .selector import DriveSelection # NOQA from .matchers import Matcher, SubstringMatcher, EqualityMatcher, AllMatcher, SizeMatcher # NOQA
143
47
97
py
null
ceph-main/src/python-common/ceph/deployment/drive_selection/example.yaml
# default: # target: 'data*' # data_devices: # size: 20G # db_devices: # size: 10G # rotational: 1 # allflash: # target: 'fast_nodes*' # data_devices: # size: 100G # db_devices: # size: 50G # rotational: 0 # This is the default configuration and # will create an OSD on all available...
394
16.954545
44
yaml
null
ceph-main/src/python-common/ceph/deployment/drive_selection/filter.py
# -*- coding: utf-8 -*- import logging from ceph.deployment.drive_group import DeviceSelection try: from typing import Generator except ImportError: pass from .matchers import Matcher, SubstringMatcher, AllMatcher, SizeMatcher, EqualityMatcher logger = logging.getLogger(__name__) class FilterGenerator(ob...
1,234
32.378378
89
py
null
ceph-main/src/python-common/ceph/deployment/drive_selection/matchers.py
# -*- coding: utf-8 -*- from typing import Tuple, Optional, Any, Union, Iterator from ceph.deployment.inventory import Device import re import logging logger = logging.getLogger(__name__) class _MatchInvalid(Exception): pass # pylint: disable=too-few-public-methods class Matcher(object): """ The base cl...
13,115
30.757869
80
py
null
ceph-main/src/python-common/ceph/deployment/drive_selection/selector.py
import logging from typing import List, Optional, Dict, Callable from ..inventory import Device from ..drive_group import DriveGroupSpec, DeviceSelection, DriveGroupValidationError from .filter import FilterGenerator from .matchers import _MatchInvalid logger = logging.getLogger(__name__) def to_dg_exception(f: C...
6,941
35.34555
100
py
null
ceph-main/src/python-common/ceph/rgw/__init__.py
import logging log = logging.getLogger(__name__)
50
11.75
33
py
null
ceph-main/src/python-common/ceph/rgw/diff.py
class ZoneEPs: def __init__(self): self.endpoints = set() def add(self, ep): if not ep: return self.endpoints.add(ep) def diff(self, zep): return list(self.endpoints.difference(zep.endpoints)) def get_all(self): for ep in self.endpoints: ...
1,898
19.202128
61
py
null
ceph-main/src/python-common/ceph/rgw/rgwam_core.py
# -*- mode:python -*- # vim: ts=4 sw=4 smarttab expandtab # # Processed in Makefile to add python #! line and version variable # # import random import string import json import socket import base64 import logging import errno from .types import RGWAMException, RGWAMCmdRunException, RGWPeriod, RGWUser, RealmToken fro...
32,681
33.842217
99
py
null
ceph-main/src/python-common/ceph/rgw/types.py
import json import base64 import binascii import errno from abc import abstractmethod class RGWAMException(Exception): def __init__(self, message, orig=None): if orig: self.message = message + ': ' + orig.message self.retcode = orig.retcode self.stdout = orig.stdout ...
5,423
28.005348
89
py
null
ceph-main/src/python-common/ceph/tests/__init__.py
0
0
0
py
null
ceph-main/src/python-common/ceph/tests/factories.py
from ceph.deployment.inventory import Device class InventoryFactory(object): def __init__(self): self.taken_paths = [] def _make_path(self, ident='b'): return "/dev/{}{}".format(self.prefix, ident) def _find_new_path(self): cnt = 0 if len(self.taken_paths) >= 25: ...
3,626
34.558824
76
py
null
ceph-main/src/python-common/ceph/tests/test_datetime.py
import datetime import pytest from ceph.utils import datetime_now, datetime_to_str, str_to_datetime def test_datetime_to_str_1(): dt = datetime.datetime.now() assert type(datetime_to_str(dt)) is str def test_datetime_to_str_2(): # note: tz isn't specified in the string, so explicitly store this as UTC...
1,744
27.145161
77
py
null
ceph-main/src/python-common/ceph/tests/test_disk_selector.py
# flake8: noqa import pytest from ceph.deployment.drive_selection.matchers import _MatchInvalid from ceph.deployment.inventory import Devices, Device from ceph.deployment.drive_group import DriveGroupSpec, DeviceSelection, \ DriveGroupValidationError from ceph.deployment import drive_selection from ceph.depl...
19,479
33.785714
99
py
null
ceph-main/src/python-common/ceph/tests/test_drive_group.py
# flake8: noqa import re import pytest import yaml from ceph.deployment import drive_selection, translate from ceph.deployment.hostspec import HostSpec, SpecValidationError from ceph.deployment.inventory import Device from ceph.deployment.service_spec import PlacementSpec from ceph.tests.utils import _mk_inventory, _...
20,737
33.971332
155
py
null
ceph-main/src/python-common/ceph/tests/test_hostspec.py
# flake8: noqa import json import yaml import pytest from ceph.deployment.hostspec import HostSpec, SpecValidationError @pytest.mark.parametrize( "test_input,expected", [ ({"hostname": "foo"}, HostSpec('foo')), ({"hostname": "foo", "labels": "l1"}, HostSpec('foo', labels=['l1'])), ({...
1,239
29.243902
102
py
null
ceph-main/src/python-common/ceph/tests/test_inventory.py
import datetime import json import os import pytest from ceph.deployment.inventory import Devices, Device from ceph.utils import datetime_now @pytest.mark.parametrize("filename", [ os.path.dirname(__file__) + '/c-v-inventory.json', os...
3,427
46.611111
100
py
null
ceph-main/src/python-common/ceph/tests/test_service_spec.py
# flake8: noqa import json import re import yaml import pytest from ceph.deployment.service_spec import ( AlertManagerSpec, ArgumentSpec, CustomContainerSpec, GrafanaSpec, HostPlacementSpec, IscsiServiceSpec, NFSServiceSpec, PlacementSpec, PrometheusSpec, RGWSpec, ServiceS...
37,163
28.239969
201
py
null
ceph-main/src/python-common/ceph/tests/test_utils.py
import pytest from ceph.deployment.utils import is_ipv6, unwrap_ipv6, wrap_ipv6, valid_addr from typing import NamedTuple def test_is_ipv6(): for good in ("[::1]", "::1", "fff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"): assert is_ipv6(good) for bad in ("127.0.0.1", "ffff:ff...
2,957
37.921053
85
py
null
ceph-main/src/python-common/ceph/tests/utils.py
from ceph.deployment.inventory import Devices, Device try: from typing import Any, List except ImportError: pass # for type checking def _mk_device(rotational=True, locked=False, size="394.27 GB", vendor='Vendor', model='Model'): return [Device...
1,359
27.93617
77
py
null
ceph-main/src/rbd_fuse/rbd-fuse.cc
/* * rbd-fuse */ #include "include/int_types.h" #include <stdio.h> #include <stdlib.h> #include <stddef.h> #include <dirent.h> #include <errno.h> #include <fcntl.h> #include <pthread.h> #include <string.h> #include <sys/types.h> #include <unistd.h> #include <getopt.h> #include <assert.h> #include <string> #include <...
21,241
20.944215
85
cc
null
ceph-main/src/rbd_replay/ActionTypes.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "rbd_replay/ActionTypes.h" #include "include/ceph_assert.h" #include "include/byteorder.h" #include "include/stringify.h" #include "common/Formatter.h" #include <iostream> #include <boost/variant.hpp> namespace ...
11,577
25.800926
83
cc
null
ceph-main/src/rbd_replay/ActionTypes.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_RBD_REPLAY_ACTION_TYPES_H #define CEPH_RBD_REPLAY_ACTION_TYPES_H #include "include/int_types.h" #include "include/buffer_fwd.h" #include "include/encoding.h" #include <iosfwd> #include <list> #include <strin...
10,290
29.267647
79
h
null
ceph-main/src/rbd_replay/BoundedBuffer.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef _INCLUDED_BOUNDED_BUFFER_HPP #define _INCLUDED_BOUNDED_BUFFER_HPP #include <boost/bind/bind.hpp> #include <boost/circular_buffer.hpp> #include <boost/thread/condition.hpp> #include <boost/thread/mutex.hpp> /** ...
2,248
30.236111
143
hpp
null
ceph-main/src/rbd_replay/BufferReader.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #include "rbd_replay/BufferReader.h" #include "include/ceph_assert.h" #include "include/intarith.h" namespace rbd_replay { BufferReader::BufferReader(int fd, size_t min_bytes, size_t max_bytes) : m_fd(fd), m_min_bytes...
1,026
26.026316
78
cc
null
ceph-main/src/rbd_replay/BufferReader.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab #ifndef CEPH_RBD_REPLAY_BUFFER_READER_H #define CEPH_RBD_REPLAY_BUFFER_READER_H #include "include/int_types.h" #include "include/buffer.h" namespace rbd_replay { class BufferReader { public: static const size_t DEFAU...
773
21.114286
70
h
null
ceph-main/src/rbd_replay/ImageNameMap.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
1,538
20.985714
81
cc
null
ceph-main/src/rbd_replay/ImageNameMap.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
1,287
22.418182
73
hpp
null
ceph-main/src/rbd_replay/PendingIO.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
1,220
26.133333
87
cc
null
ceph-main/src/rbd_replay/PendingIO.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
1,474
21.692308
83
hpp
null
ceph-main/src/rbd_replay/Replayer.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
11,257
26.525672
138
cc
null
ceph-main/src/rbd_replay/Replayer.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
3,876
22.077381
87
hpp
null
ceph-main/src/rbd_replay/actions.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
8,538
33.01992
100
cc
null
ceph-main/src/rbd_replay/actions.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
8,631
24.02029
107
hpp
null
ceph-main/src/rbd_replay/ios.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
7,319
32.122172
128
cc
null
ceph-main/src/rbd_replay/ios.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
8,880
21.09204
84
hpp
null
ceph-main/src/rbd_replay/rbd-replay-prep.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
20,311
33.721368
149
cc
null
ceph-main/src/rbd_replay/rbd-replay.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
4,707
35.215385
117
cc
null
ceph-main/src/rbd_replay/rbd_loc.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
2,670
19.389313
77
cc
null
ceph-main/src/rbd_replay/rbd_loc.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
2,490
26.373626
86
hpp
null
ceph-main/src/rbd_replay/rbd_replay_debug.hpp
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab /* * Ceph - scalable distributed file system * * Copyright (C) 2014 Adam Crume <adamcrume@gmail.com> * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Pub...
847
23.228571
70
hpp
null
ceph-main/src/rgw/MAINTAINERS.md
# RGW Maintainers Maintainers are the default assignee for related tracker issues and pull requests. | Component | Name | |---------------------------------|---------------------------------| | auth, STS | Pritha Srivastava | | bucke...
1,503
50.862069
82
md
null
ceph-main/src/rgw/librgw.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2022 New Dream Network * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * ...
1,794
18.944444
70
cc
null
ceph-main/src/rgw/rgw_acl.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <string.h> #include <iostream> #include <map> #include "include/types.h" #include "common/Formatter.h" #include "rgw_acl.h" #include "rgw_acl_s3.h" #include "rgw_user.h" #define dout_subsys ceph_subsy...
13,781
30.110609
105
cc
null
ceph-main/src/rgw/rgw_acl.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <map> #include <string> #include <string_view> #include <include/types.h> #include <boost/optional.hpp> #include <boost/algorithm/string/predicate.hpp> #include "common/debug.h" #include "...
11,762
27.344578
107
h
null
ceph-main/src/rgw/rgw_acl_s3.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <string.h> #include <iostream> #include <map> #include "include/types.h" #include "rgw_acl_s3.h" #include "rgw_user.h" #include "rgw_sal.h" #define dout_subsys ceph_subsys_rgw #define RGW_URI_ALL_US...
17,626
26.371118
135
cc
null
ceph-main/src/rgw/rgw_acl_s3.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <map> #include <string> #include <iosfwd> #include <include/types.h> #include "include/str_list.h" #include "rgw_xml.h" #include "rgw_acl.h" #include "rgw_sal_fwd.h" class RGWUserCtl; clas...
3,136
26.043103
102
h
null
ceph-main/src/rgw/rgw_acl_swift.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <string.h> #include <vector> #include <boost/algorithm/string/predicate.hpp> #include "common/ceph_json.h" #include "rgw_common.h" #include "rgw_user.h" #include "rgw_acl_swift.h" #include "rgw_sal.h" ...
12,827
28.220957
87
cc
null
ceph-main/src/rgw/rgw_acl_swift.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <map> #include <vector> #include <string> #include <include/types.h> #include <boost/optional.hpp> #include "rgw_acl.h" class RGWUserCtl; class RGWAccessControlPolicy_SWIFT : public RGWAc...
1,709
27.983051
73
h
null
ceph-main/src/rgw/rgw_acl_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2019 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
5,909
26.616822
79
h
null
ceph-main/src/rgw/rgw_admin.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <errno.h> #include <iostream> #include <sstream> #include <string> #include <boost/optional.hpp> extern "C" { #include <liboath/oath.h> } #include <fmt/format.h> #include "auth/Crypto.h" #include "comp...
379,777
34.410536
211
cc
null
ceph-main/src/rgw/rgw_aio.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2018 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
5,020
33.156463
146
cc
null
ceph-main/src/rgw/rgw_aio.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2018 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
3,161
29.114286
84
h
null
ceph-main/src/rgw/rgw_aio_throttle.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2018 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
5,041
23.837438
74
cc
null
ceph-main/src/rgw/rgw_aio_throttle.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2018 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
3,530
25.954198
78
h
null
ceph-main/src/rgw/rgw_amqp.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include "rgw_amqp.h" #include <amqp.h> #include <amqp_ssl_socket.h> #include <amqp_tcp_socket.h> #include <amqp_framing.h> #include "include/ceph_assert.h" #include <sstream> #include <cstring> #include <unordered...
37,625
34.76616
146
cc
null
ceph-main/src/rgw/rgw_amqp.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <string> #include <functional> #include <boost/optional.hpp> #include "include/common_fwd.h" struct amqp_connection_info; namespace rgw::amqp { // the reply callback is expected to get a...
2,234
25.927711
133
h
null
ceph-main/src/rgw/rgw_appmain.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2022 Red Hat, Inc * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Licen...
20,164
30.755906
103
cc
null
ceph-main/src/rgw/rgw_arn.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include "rgw_arn.h" #include "rgw_common.h" #include <regex> using namespace std; namespace rgw { namespace { boost::optional<Partition> to_partition(const smatch::value_type& p, bool wildcards) { if (p ...
11,916
29.713918
109
cc
null
ceph-main/src/rgw/rgw_arn.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <string> #include <boost/optional.hpp> class rgw_obj; class rgw_bucket; namespace rgw { enum struct Partition { aws, aws_cn, aws_us_gov, wildcard // If we wanted our own ARNs for princi...
3,948
31.368852
113
h
null
ceph-main/src/rgw/rgw_asio_client.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <boost/algorithm/string/predicate.hpp> #include <boost/asio/write.hpp> #include "rgw_asio_client.h" #include "rgw_perf_counters.h" #define dout_context g_ceph_context #define dout_subsys ceph_subsys_rgw ...
5,299
26.46114
79
cc
null
ceph-main/src/rgw/rgw_asio_client.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <boost/asio/ip/tcp.hpp> #include <boost/beast/core.hpp> #include <boost/beast/http.hpp> #include "include/ceph_assert.h" #include "rgw_client_io.h" namespace rgw { namespace asio { namespa...
1,640
25.047619
74
h
null
ceph-main/src/rgw/rgw_asio_frontend.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <atomic> #include <ctime> #include <thread> #include <vector> #include <boost/asio.hpp> #include <boost/intrusive/list.hpp> #include <boost/smart_ptr/intrusive_ref_counter.hpp> #include <boost/context/pr...
36,436
29.364167
103
cc
null
ceph-main/src/rgw/rgw_asio_frontend.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <memory> #include "rgw_frontend.h" #define REQUEST_TIMEOUT 65000 class RGWAsioFrontend : public RGWFrontend { class Impl; std::unique_ptr<Impl> impl; public: RGWAsioFrontend(RGWProcess...
611
22.538462
70
h
null
ceph-main/src/rgw/rgw_asio_frontend_timer.h
#pragma once #include <boost/asio/basic_waitable_timer.hpp> #include <boost/intrusive_ptr.hpp> #include "common/ceph_time.h" namespace rgw { // a WaitHandler that closes a stream if the timeout expires template <typename Stream> struct timeout_handler { // this handler may outlive the timer/stream, so we need to ...
1,822
26.208955
93
h
null
ceph-main/src/rgw/rgw_auth.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <array> #include <string> #include "rgw_common.h" #include "rgw_auth.h" #include "rgw_quota.h" #include "rgw_user.h" #include "rgw_http_client.h" #include "rgw_keystone.h" #include "rgw_sal.h" #include "r...
30,728
31.865241
149
cc
null
ceph-main/src/rgw/rgw_auth.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <functional> #include <optional> #include <ostream> #include <type_traits> #include <system_error> #include <utility> #include "rgw_common.h" #include "rgw_web_idp.h" #define RGW_USER_ANON_...
28,787
35.348485
144
h
null
ceph-main/src/rgw/rgw_auth_filters.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <type_traits> #include <boost/logic/tribool.hpp> #include <boost/optional.hpp> #include "rgw_service.h" #include "rgw_common.h" #include "rgw_auth.h" #include "rgw_user.h" namespace rgw { ...
9,946
31.828383
109
h
null
ceph-main/src/rgw/rgw_auth_keystone.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <string> #include <vector> #include <errno.h> #include <fnmatch.h> #include "rgw_b64.h" #include "common/errno.h" #include "common/ceph_json.h" #include "include/types.h" #include "include/str_list.h" ...
27,011
33.944373
125
cc
null
ceph-main/src/rgw/rgw_auth_keystone.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <string_view> #include <utility> #include <boost/optional.hpp> #include "rgw_auth.h" #include "rgw_rest_s3.h" #include "rgw_common.h" #include "rgw_keystone.h" namespace rgw { namespace aut...
7,368
35.661692
117
h
null
ceph-main/src/rgw/rgw_auth_registry.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <functional> #include <memory> #include <ostream> #include <type_traits> #include <utility> #include "rgw_auth.h" #include "rgw_auth_s3.h" #include "rgw_swift_auth.h" #include "rgw_rest_sts....
3,080
30.438776
84
h
null
ceph-main/src/rgw/rgw_auth_s3.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <algorithm> #include <map> #include <iterator> #include <string> #include <string_view> #include <vector> #include "common/armor.h" #include "common/utf8.h" #include "rgw_rest_s3.h" #include "rgw_auth_s3....
42,302
31.24314
109
cc
null
ceph-main/src/rgw/rgw_auth_s3.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <array> #include <memory> #include <string> #include <string_view> #include <tuple> #include <boost/algorithm/string.hpp> #include <boost/container/static_vector.hpp> #include "common/sstri...
23,640
35.539413
101
h
null
ceph-main/src/rgw/rgw_b64.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <boost/archive/iterators/base64_from_binary.hpp> #include <boost/archive/iterators/binary_from_base64.hpp> #include <boost/archive/iterators/insert_linebreaks.hpp> #include <boost/archive/ite...
2,336
26.494118
70
h
null
ceph-main/src/rgw/rgw_basic_types.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <iostream> #include <sstream> #include <string> #include "cls/user/cls_user_types.h" #include "rgw_basic_types.h" #include "rgw_bucket.h" #include "rgw_xml.h" #include "common/ceph_json.h" #include "com...
4,934
26.265193
89
cc
null
ceph-main/src/rgw/rgw_basic_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2019 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
7,263
23.876712
91
h
null
ceph-main/src/rgw/rgw_bucket.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include "rgw_bucket.h" #include "common/errno.h" #define dout_subsys ceph_subsys_rgw // stolen from src/cls/version/cls_version.cc #define VERSION_ATTR "ceph.objclass.version" using namespace std; static void...
5,216
26.898396
124
cc
null
ceph-main/src/rgw/rgw_bucket.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <string> #include <memory> #include <variant> #include <boost/container/flat_map.hpp> #include <boost/container/flat_set.hpp> #include "include/types.h" #include "rgw_common.h" #include "rg...
1,295
34.027027
132
h
null
ceph-main/src/rgw/rgw_bucket_encryption.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp // #include "rgw_bucket_encryption.h" #include "rgw_xml.h" #include "common/ceph_json.h" void ApplyServerSideEncryptionByDefault::decode_xml(XMLObj *obj) { RGWXMLDecoder::decode_xml("KMSMasterKeyID", kmsMasterKey...
1,677
32.56
114
cc
null
ceph-main/src/rgw/rgw_bucket_encryption.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <include/types.h> class XMLObj; class ApplyServerSideEncryptionByDefault { std::string kmsMasterKeyID; std::string sseAlgorithm; public: ApplyServerSideEncryptionByDefault() {}; App...
3,562
23.916084
80
h
null
ceph-main/src/rgw/rgw_bucket_layout.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2020 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
9,706
24.47769
100
cc
null
ceph-main/src/rgw/rgw_bucket_layout.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2020 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
9,694
33.257951
105
h
null
ceph-main/src/rgw/rgw_bucket_sync_cache.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2020 Red Hat, Inc * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Licen...
3,750
31.059829
84
h
null
ceph-main/src/rgw/rgw_bucket_types.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2019 Red Hat, Inc. * * This is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Lice...
6,688
27.58547
82
h
null
ceph-main/src/rgw/rgw_cache.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include "rgw_cache.h" #include "rgw_perf_counters.h" #include <errno.h> #define dout_subsys ceph_subsys_rgw using namespace std; int ObjectCache::get(const DoutPrefixProvider *dpp, const string& name, ObjectCa...
11,630
26.692857
143
cc
null
ceph-main/src/rgw/rgw_cache.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <string> #include <map> #include <unordered_map> #include "include/types.h" #include "include/utime.h" #include "include/ceph_assert.h" #include "common/ceph_mutex.h" #include "cls/version/c...
6,247
27.017937
136
h
null
ceph-main/src/rgw/rgw_client_io.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include "rgw_client_io.h" #include "rgw_crypt.h" #include "rgw_crypt_sanitize.h" #define dout_subsys ceph_subsys_rgw namespace rgw { namespace io { [[n...
801
21.914286
70
cc
null
ceph-main/src/rgw/rgw_client_io.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <exception> #include <string> #include <string_view> #include <streambuf> #include <istream> #include <stdlib.h> #include <system_error> #include "include/types.h" #include "rgw_common.h" ...
15,240
33.956422
81
h
null
ceph-main/src/rgw/rgw_client_io_filters.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #pragma once #include <type_traits> #include <boost/optional.hpp> #include "rgw_common.h" #include "rgw_client_io.h" namespace rgw { namespace io { template <typename T> class AccountingFilter : public Decorat...
13,842
29.424176
88
h
null
ceph-main/src/rgw/rgw_common.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include <errno.h> #include <vector> #include <algorithm> #include <string> #include <boost/tokenizer.hpp> #include "json_spirit/json_spirit.h" #include "common/ceph_json.h" #include "common/Formatter.h" #include...
88,229
27.683355
150
cc
null
ceph-main/src/rgw/rgw_common.h
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp /* * Ceph - scalable distributed file system * * Copyright (C) 2004-2009 Sage Weil <sage@newdream.net> * Copyright (C) 2015 Yehuda Sadeh <yehuda@redhat.com> * * This is free software; you can redistribute it ...
59,215
31.095393
149
h
null
ceph-main/src/rgw/rgw_compression.cc
// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- // vim: ts=8 sw=2 smarttab ft=cpp #include "rgw_compression.h" #define dout_subsys ceph_subsys_rgw using namespace std; int rgw_compression_info_from_attr(const bufferlist& attr, bool& need_decompress, ...
7,803
31.92827
101
cc