Áú»¢¶Ä²©

This is the documentation page for an unsupported version of Áú»¢¶Ä²©.
Is this not what you were looking for? Switch to the current version or choose one from the drop-down menu.

hostinterface.massadd

³¢±ð¨ª°ù¨¢²õ

objektum hostinterface.massadd(objektumparam¨¦terek)

Ez a m¨®dszer lehet?v¨¦ teszi, hogy egyidej?leg t?bb gazdag¨¦p interf¨¦szt adjunk hozz¨¢ otthont ad.

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 host interfaces to be created on the given hosts.

The method accepts the following parameters.

Parameter Type Description
hosts
(required)
object/array Hosts to be updated.

The hosts must have the hostid property defined.
interfaces
(required)
object/array Host interfaces to create on the given hosts.

Visszat¨¦r¨¦si ¨¦rt¨¦kek

(object) Egy objektumot ad vissza, amely tartalmazza a l¨¦trehozott gazdag¨¦p azonos¨ªt¨®it interf¨¦szeket az interfaceids tulajdons¨¢g alatt.

±Ê¨¦±ô»å¨¢°ì

Creating interfaces

Create an interface on two hosts.

Request:

{
           "jsonrpc": "2.0",
           "method": "hostinterface.massadd",
           "params": {
               "hosts": [
                   {
                       "hostid": "30050"
                   },
                   {
                       "hostid": "30052"
                   }
               ],
               "interfaces": {
                   "dns": "",
                   "ip": "127.0.0.1",
                   "main": 0,
                   "port": "10050",
                   "type": 1,
                   "useip": 1
               }
           },
           "auth": "038e1d7b1735c6a5436ee9eae095879e",
           "id": 1
       }

Response:

{
           "jsonrpc": "2.0",
           "result": {
               "interfaceids": [
                   "30069",
                   "30070"
               ]
           },
           "id": 1
       }

L¨¢sd m¨¦g

¹ó´Ç°ù°ù¨¢²õ

CHostInterface::massAdd() in ui/include/classes/api/services/CHostInterface.php.