Beispiel #1
0
def test_edit_hosts(web):
    try:
        web.add_host("test-edit-hosts1", attributes={
            "ipaddress": "127.0.0.1",
        })
        web.add_host("test-edit-hosts2", attributes={
            "ipaddress": "127.0.0.1",
        })

        web.edit_hosts([
            ("test-edit-hosts1", {
                "ipaddress": "127.10.0.1"
            }, []),
            ("test-edit-hosts2", {
                "ipaddress": "127.20.0.1"
            }, []),
        ])
    finally:
        web.delete_hosts(["test-edit-hosts1", "test-edit-hosts2"])
Beispiel #2
0
def test_edit_hosts(web):  # noqa: F811 # pylint: disable=redefined-outer-name
    try:
        web.add_host("test-edit-hosts1", attributes={
            "ipaddress": "127.0.0.1",
        })
        web.add_host("test-edit-hosts2", attributes={
            "ipaddress": "127.0.0.1",
        })

        web.edit_hosts([
            ("test-edit-hosts1", {
                "ipaddress": "127.10.0.1"
            }, []),
            ("test-edit-hosts2", {
                "ipaddress": "127.20.0.1"
            }, []),
        ])
    finally:
        web.delete_hosts(["test-edit-hosts1", "test-edit-hosts2"])