Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

admin/doc-requirements: bump sphinx to 4.4.0 #45266

Merged
merged 7 commits into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions admin/doc-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx == 3.5.4
Sphinx == 4.4.0
git+https://github.com/ceph/sphinx-ditaa.git@py3#egg=sphinx-ditaa
git+https://github.com/vlasovskikh/funcparserlib.git
breathe >= 4.20.0,!=4.33
Expand All @@ -10,7 +10,7 @@ pcpp
prettytable
sphinx-autodoc-typehints
sphinx-prompt
sphinx_rtd_theme == 0.5.2
sphinx_rtd_theme == 1.0.0
Sphinx-Substitution-Extensions
typed-ast
sphinxcontrib-openapi
Expand Down
3 changes: 2 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,8 @@ def is_release_eol(codename):
breathe_doxygen_config_options = {
'EXPAND_ONLY_PREDEF': 'YES',
'MACRO_EXPANSION': 'YES',
'PREDEFINED': 'CEPH_RADOS_API= '
'PREDEFINED': 'CEPH_RADOS_API= ',
'WARN_IF_UNDOCUMENTED': 'NO',
}

# graphviz options
Expand Down
28 changes: 16 additions & 12 deletions src/pybind/mgr/orchestrator/_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from collections import namedtuple, OrderedDict
from contextlib import contextmanager
from functools import wraps, reduce
from functools import wraps, reduce, update_wrapper

from typing import TypeVar, Generic, List, Optional, Union, Tuple, Iterator, Callable, Any, \
Sequence, Dict, cast, Mapping
Expand Down Expand Up @@ -565,8 +565,10 @@ def remove_osds(self, osd_ids: List[str],
:param replace: marks the OSD as being destroyed. See :ref:`orchestrator-osd-replace`
:param force: Forces the OSD removal process without waiting for the data to be drained first.
:param zap: Zap/Erase all devices associated with the OSDs (DESTROYS DATA)
Note that this can only remove OSDs that were successfully
created (i.e. got an OSD ID).


.. note:: this can only remove OSDs that were successfully
created (i.e. got an OSD ID).
"""
raise NotImplementedError()

Expand Down Expand Up @@ -1251,13 +1253,14 @@ class InventoryFilter(object):
When fetching inventory, use this filter to avoid unnecessarily
scanning the whole estate.

Typical use: filter by host when presenting UI workflow for configuring
a particular server.
filter by label when not all of estate is Ceph servers,
and we want to only learn about the Ceph servers.
filter by label when we are interested particularly
in e.g. OSD servers.
Typical use:

filter by host when presentig UI workflow for configuring
a particular server.
filter by label when not all of estate is Ceph servers,
and we want to only learn about the Ceph servers.
filter by label when we are interested particularly
in e.g. OSD servers.
"""

def __init__(self, labels: Optional[List[str]] = None, hosts: Optional[List[str]] = None) -> None:
Expand Down Expand Up @@ -1424,9 +1427,10 @@ def inner(self: Any, *args: Any, **kwargs: Any) -> Any:
return completion
return inner

for meth in Orchestrator.__dict__:
if not meth.startswith('_') and meth not in ['is_orchestrator_module']:
setattr(cls, meth, shim(meth))
for name, method in Orchestrator.__dict__.items():
if not name.startswith('_') and name not in ['is_orchestrator_module']:
remote_call = update_wrapper(shim(name), method)
setattr(cls, name, remote_call)
return cls


Expand Down
10 changes: 8 additions & 2 deletions src/python-common/ceph/deployment/service_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,28 +314,34 @@ def from_string(cls, arg):
# type: (Optional[str]) -> PlacementSpec
"""
A single integer is parsed as a count:

>>> PlacementSpec.from_string('3')
PlacementSpec(count=3)

A list of names is parsed as host specifications:

>>> PlacementSpec.from_string('host1 host2')
PlacementSpec(hosts=[HostPlacementSpec(hostname='host1', network='', name=''), HostPlacemen\
tSpec(hostname='host2', network='', name='')])

You can also prefix the hosts with a count as follows:

>>> PlacementSpec.from_string('2 host1 host2')
PlacementSpec(count=2, hosts=[HostPlacementSpec(hostname='host1', network='', name=''), Hos\
tPlacementSpec(hostname='host2', network='', name='')])

You can spefify labels using `label:<label>`
You can specify labels using `label:<label>`

>>> PlacementSpec.from_string('label:mon')
PlacementSpec(label='mon')

Labels als support a count:
Labels also support a count:

>>> PlacementSpec.from_string('3 label:mon')
PlacementSpec(count=3, label='mon')

fnmatch is also supported:

>>> PlacementSpec.from_string('data[1-3]')
PlacementSpec(host_pattern='data[1-3]')

Expand Down