mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-01-11 08:41:55 -06:00
install: introduce updated knob constructor
Add new knob() knob constructor. Keep the old Knob() constructor for backward compatibility with old code. https://fedorahosted.org/freeipa/ticket/6392 Reviewed-By: Martin Basti <mbasti@redhat.com>
This commit is contained in:
parent
be0c1afa74
commit
9fd1981ae8
@ -141,7 +141,7 @@ class KnobBase(PropertyBase):
|
|||||||
return cls
|
return cls
|
||||||
|
|
||||||
|
|
||||||
def Knob(type_or_base, default=_missing, sensitive=_missing,
|
def knob(type_or_base, default=_missing, sensitive=_missing,
|
||||||
deprecated=_missing, description=_missing, cli_positional=_missing,
|
deprecated=_missing, description=_missing, cli_positional=_missing,
|
||||||
cli_name=_missing, cli_short_name=_missing, cli_aliases=_missing,
|
cli_name=_missing, cli_short_name=_missing, cli_aliases=_missing,
|
||||||
cli_metavar=_missing):
|
cli_metavar=_missing):
|
||||||
@ -175,6 +175,22 @@ def Knob(type_or_base, default=_missing, sensitive=_missing,
|
|||||||
return util.InnerClassMeta('Knob', (type_or_base,), class_dict)
|
return util.InnerClassMeta('Knob', (type_or_base,), class_dict)
|
||||||
|
|
||||||
|
|
||||||
|
def Knob(type_or_base, default=_missing, sensitive=_missing,
|
||||||
|
deprecated=_missing, description=_missing, cli_positional=_missing,
|
||||||
|
cli_name=_missing, cli_short_name=_missing, cli_aliases=_missing,
|
||||||
|
cli_metavar=_missing):
|
||||||
|
return knob(type_or_base,
|
||||||
|
default=default,
|
||||||
|
sensitive=sensitive,
|
||||||
|
deprecated=deprecated,
|
||||||
|
description=description,
|
||||||
|
cli_positional=cli_positional,
|
||||||
|
cli_name=cli_name,
|
||||||
|
cli_short_name=cli_short_name,
|
||||||
|
cli_aliases=cli_aliases,
|
||||||
|
cli_metavar=cli_metavar)
|
||||||
|
|
||||||
|
|
||||||
class Configurable(six.with_metaclass(abc.ABCMeta, object)):
|
class Configurable(six.with_metaclass(abc.ABCMeta, object)):
|
||||||
"""
|
"""
|
||||||
Base class of all configurables.
|
Base class of all configurables.
|
||||||
|
Loading…
Reference in New Issue
Block a user