On this page
hostinterface.massremove
Leírás
object hostinterface.massremove(object parameters)
Ez a módszer lehetővé teszi a gazdagép interfészek eltávolítását az adott gépekről.
Ez a módszer csak az Admin és a Kiemelt rendszergazda számára érhető el felhasználói típusok. A metódus meghívására vonatkozó engedélyek felhasználói szerepkörben visszavonhatók beállítások. Lásd: User roles további információért.
Parameters
(object) Parameters containing the IDs of the hosts to be updated and
the interfaces to be removed.
| Parameter | Type | Description |
|---|---|---|
| hostids (required) |
string/array | IDs of the hosts to be updated. |
| interfaces (required) |
object/array | Host interfaces to remove from the given hosts. The host interface object must have the ip, dns and port properties defined |
Visszatérési értékek
(object) Egy objektumot ad vissza, amely tartalmazza a törölt gazdagép azonosítóit
interfészek az interfaceids tulajdonság alatt.
Példák
Removing interfaces
Remove the "127.0.0.1" SNMP interface from two hosts.
Request:
{
"jsonrpc": "2.0",
"method": "hostinterface.massremove",
"params": {
"hostids": [
"30050",
"30052"
],
"interfaces": {
"dns": "",
"ip": "127.0.0.1",
"port": "161"
}
},
"auth": "038e1d7b1735c6a5436ee9eae095879e",
"id": 1
}
Response:
{
"jsonrpc": "2.0",
"result": {
"interfaceids": [
"30069",
"30070"
]
},
"id": 1
}
Lásd még
Forrás
CHostInterface::massRemove() in ui/include/classes/api/services/CHostInterface.php.