summaryrefslogtreecommitdiffstats
path: root/src/share/api/lease6-bulk-apply.json
blob: 2958e41830d05ed99df3359eaa7e802df1725c7f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
{
    "access": "write",
    "avail": "1.6.0",
    "brief": [
        "This command creates, updates, or deletes multiple IPv6 leases in a single transaction. It communicates lease changes between HA peers, but may be used in all cases where it is desirable to apply multiple lease updates in a single transaction."
    ],
    "cmd-comment": [
        "If any of the leases is malformed, all changes are rolled back. If the leases are well-formed but the operation fails for one or more leases, these leases are listed in the response; however, the changes are preserved for all leases for which the operation was successful. The \"deleted-leases\" and \"leases\" are optional parameters, but one of them must be specified."
    ],
    "cmd-syntax": [
        "{",
        "    \"command\": \"lease6-bulk-apply\",",
        "    \"arguments\": {",
        "        \"deleted-leases\": [",
        "            {",
        "                \"ip-address\": \"2001:db8:abcd::\",",
        "                \"type\": \"IA_PD\",",
        "                ...",
        "            },",
        "            {",
        "                \"ip-address\": \"2001:db8:abcd::234\",",
        "                \"type\": \"IA_NA\",",
        "                ...",
        "            }",
        "        ],",
        "        \"leases\": [",
        "            {",
        "                \"subnet-id\": 66,",
        "                \"ip-address\": \"2001:db8:cafe::\",",
        "                \"type\": \"IA_PD\",",
        "                ...",
        "            },",
        "            {",
        "                \"subnet-id\": 66,",
        "                \"ip-address\": \"2001:db8:abcd::333\",",
        "                \"type\": \"IA_NA\",",
        "                ...",
        "            }",
        "        ]",
        "    }",
        "}"
    ],
    "hook": "lease_cmds",
    "name": "lease6-bulk-apply",
    "resp-comment": [
        "The \"failed-deleted-leases\" holds the list of leases which failed to delete; this includes leases which were not found in the database. The \"failed-leases\" includes the list of leases which failed to create or update. For each lease for which there was an error during processing, insertion into the database, etc., the result is set to 1. For each lease which was not deleted because the server did not find it in the database, the result of 3 is returned."
    ],
    "resp-syntax": [
        "{",
        "    \"result\": 0,",
        "    \"text\": \"IPv6 leases bulk apply completed.\",",
        "    \"arguments\": {",
        "        \"failed-deleted-leases\": [",
        "            {",
        "                \"ip-address\": \"2001:db8:abcd::\",",
        "                \"type\": \"IA_PD\",",
        "                \"result\": <control result>,",
        "                \"error-message\": <error message>",
        "            }",
        "        ],",
        "        \"failed-leases\": [",
        "            {",
        "                \"ip-address\": \"2001:db8:cafe::\",",
        "                \"type\": \"IA_PD\",",
        "                \"result\": <control result>,",
        "                \"error-message\": <error message>",
        "            }",
        "        ]",
        "    }",
        "}"
    ],
    "support": [
        "kea-dhcp6"
    ]
}