Example #1
0
def test_add_replication_paths():
    activate_changes.add_replication_paths([
        ReplicationPath("dir", "abc", "path/to/abc", ["e1", "e2"]),
    ])

    assert activate_changes.get_replication_paths()[-1] == ReplicationPath(
        "dir", "abc", "path/to/abc", ["e1", "e2"])
Example #2
0
def test_add_replication_paths_pre_17():
    # dir/file, ident, path, optional list of excludes
    activate_changes.add_replication_paths([
        ("dir", "abc", "/path/to/abc"),
        ("dir", "abc", "/path/to/abc", ["e1", "e2"]),
    ])

    assert activate_changes.get_replication_paths()[-2] == ReplicationPath(
        "dir", "abc", "/path/to/abc", [])
    assert activate_changes.get_replication_paths()[-1] == ReplicationPath(
        "dir", "abc", "/path/to/abc", ["e1", "e2"])
Example #3
0
def test_add_replication_paths_pre_17(monkeypatch):
    monkeypatch.setattr(cmk.utils.paths, "omd_root", Path("/path"))
    # dir/file, ident, path, optional list of excludes
    activate_changes.add_replication_paths([
        ("dir", "abc", "/path/to/abc"),
        ("dir", "abc", "/path/to/abc", ["e1", "e2"]),
    ])
    monkeypatch.undo()

    assert activate_changes.get_replication_paths()[-2] == ReplicationPath(
        "dir", "abc", "to/abc", [])
    assert activate_changes.get_replication_paths()[-1] == ReplicationPath(
        "dir", "abc", "to/abc", ["e1", "e2"])
Example #4
0
                          "The performance data (RRDs) and HW/SW inventory archive are never deleted "
                          "during host deletion. They are only deleted automatically when you enable "
                          "this option and after the configured period."),
                    ),
                ),
            ],
            default_keys=["cleanup_abandoned_host_files"],
            empty_text=_("Disk space cleanup is disabled"),
        )


add_replication_paths([
    ReplicationPath(
        "file",
        "diskspace",
        str(
            ConfigDomainDiskspace.diskspace_config.relative_to(
                cmk.utils.paths.omd_root)),
        [],
    ),
])

# .
#   .--Apache--------------------------------------------------------------.
#   |                    _                     _                           |
#   |                   / \   _ __   __ _  ___| |__   ___                  |
#   |                  / _ \ | '_ \ / _` |/ __| '_ \ / _ \                 |
#   |                 / ___ \| |_) | (_| | (__| | | |  __/                 |
#   |                /_/   \_\ .__/ \__,_|\___|_| |_|\___|                 |
#   |                        |_|                                           |
#   +----------------------------------------------------------------------+
#   | Manage settings of the site apache                                   |