Robot Framework SSH Library
SSHLibrary.config.Configuration Class Reference

A simple configuration class. More...

Inheritance diagram for SSHLibrary.config.Configuration:
SSHLibrary.abstractclient._ClientConfiguration SSHLibrary.library._DefaultConfiguration

Public Member Functions

def __init__ (self, **entries)
 
def __str__ (self)
 
def update (self, **entries)
 Update configuration entries. More...
 
def get (self, name)
 Return entry corresponding to name. More...
 
def __getattr__ (self, name)
 

Private Attributes

 _config
 

Detailed Description

A simple configuration class.

Configuration is defined with keyword arguments, in which the value must
be an instance of :py:class:`Entry`. Different subclasses of `Entry` can
be used to handle common types and conversions.

Example::

    cfg = Configuration(name=StringEntry('initial'),
                        age=IntegerEntry('42'))
    assert cfg.name == initial
    assert cfg.age == 42
    cfg.update(name='John Doe')
    assert cfg.name == 'John Doe'

Definition at line 40 of file config.py.

Constructor & Destructor Documentation

◆ __init__()

def SSHLibrary.config.Configuration.__init__ (   self,
**  entries 
)

Definition at line 41 of file config.py.

Member Function Documentation

◆ __getattr__()

def SSHLibrary.config.Configuration.__getattr__ (   self,
  name 
)

Definition at line 64 of file config.py.

◆ __str__()

def SSHLibrary.config.Configuration.__str__ (   self)

Definition at line 44 of file config.py.

◆ get()

def SSHLibrary.config.Configuration.get (   self,
  name 
)

Return entry corresponding to name.

Definition at line 61 of file config.py.

◆ update()

def SSHLibrary.config.Configuration.update (   self,
**  entries 
)

Update configuration entries.

    :param entries: entries to be updated, keyword argument names must
        match existing entry names. If any value in `**entries` is None,
        the corresponding entry is *not* updated.

    See `__init__` for an example.

Definition at line 55 of file config.py.

Member Data Documentation

◆ _config

SSHLibrary.config.Configuration._config
private

Definition at line 42 of file config.py.


The documentation for this class was generated from the following file: