Revision 54ca6e4b
ID | 54ca6e4b2e058a991eeef8f7e0306ac6a97afcd2 |
Parent | 013ce4ae |
Child | d7c42723 |
watcher.state: Use strings, not objects
Until now the state class would receive instances as objects
(ganeti.watcher.Instance), but this is not necessary. By using strings
the interface is simplified.
This patch also simplifies some code accessing the internal structures,
e.g. setting a key of a dictionary. Some instances of “del dict[key]”
are replaced with “dict.pop(key, None)” to suppress any exceptions if
the key doesn't exist.
Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Files
- added
- modified
- copied
- renamed
- deleted