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>
Please register or sign in to comment