Document toolboxDocument toolbox

(2024.2) PPL Bulk Update Event


PPL Bulk Update Event
/**
* Event: Ports/Pins/Lens Bulk Update requested
* Listener Class: Cabling_Model_PortsPinsLens
* Listener Method: eventBulkRange
*/
 
//*NOTE* Can only be triggered on the the PPL Range form when a change affects more than 100 Pairs/Strands.
//example: Create over a hundred new PPLs on a piece of equipment using the PPL range form.
 
 
PCR_Event::attachDb(
    "ppl-bulk-update",
    ["Cabling_Model_PortsPinsLens" => "eventBulkRange"]
);
PCR_Event::trigger(
    "ppl-bulk-update",    
    [      
        [
        "type" => "Ports\/Pins\/Lens",
        "method" => "savePPL",
        "params" =>
        [
            "RECID" => "addNew",
            "status" => "188",
            "multiple" => "0",
            "side" => "207",
            "speed" => null,
            "ip4_address" => null,
            "ip4_subnet_mask" => null,
            "ip6_address" => null,
            "ip6_subnet_mask" => null,
            "udf" =>
        [
                "141" =>
                [
                    "VALUE" => null,
                    "DATATYPE" => "VARCHAR"
                ],
                "146" =>
                [
                    "VALUE" => "0",
                    "DATATYPE" => "BOOL"
                ],
                "165" =>
                [
                    "VALUE" => null,
                    "DATATYPE" => "INTEGER"
                ]      
        ],
            "vlan_display" => null,
            "backConnectEqp_display" => null,
            "bulkType" => "create",
            "confirmed" => true
        ],
        "formFieldKey" =>
            [
            "PORTS_PINS_LENS" =>
            [
                "RECID" => "RECID",
                "status" => "PAIR_STATUS_LISTS_RECID",
                "multiple" => "MULTIPLE",
                "side" => "PORT_SIDE_LISTS_RECID",
                "speed" => "PORT_SPEED_LISTS_RECID",
                "ip4_address" => "IP4_ADDRESS",
                "ip4_subnet_mask" => "IP4_SUBNET_MASK",
                "ip6_address" => "IP6_ADDRESS",
                "ip6_subnet_mask" => "IP6_SUBNET_MASK"
            ],
            "RECID" => "RECID"
            ],
        "dialogData" => null,
        "prefixRange" =>
        [
            "01",
            "02",
            "03",
            "04",
            "05",
            "06",
            "07",
            "08",
            "09",
            "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",
            "76",
            "77",
            "78",
            "79",
            "80",
            "81",
            "82",
            "83",
            "84",
            "85",
            "86",
            "87",
            "88",
            "89",
            "90",
            "91",
            "92",
            "93",
            "94",
            "95",
            "96",
            "97",
            "98",
            "99",
            "100",
            "101",
            "102",
            "103",
            "104",
            "105",
            "106",
            "107",
            "108",
            "109",
            "110",
            "111",
            "112",
            "113",
            "114",
            "115",
            "116",
            "117",
            "118",
            "119",
            "120",
            "121",
            "122",
            "123",
            "124",
            "125",
            "126",
            "127",
            "128",
            "129",
            "130",
            "131",
            "132",
            "133",
            "134",
            "135",
            "136",
            "137",
            "138",
            "139",
            "140",
            "141",
            "142",
            "143",
            "144",
            "145",
            "146",
            "147",
            "148",
            "149",
            "150"
        ],
        "suffixRange" => [],
        "backConnectPrefixRange" => [],
        "backConnectSuffixRange" => [],
        "rangeSize" => 150,
        "comment" => "",
        "users_recid" => "1217",
        "contact" => "216121",
 
        "eventBroadcastBy" => "216121",
        "eventBroadcastTime" => "Oct 4, 2022, 2:45 pm",
        "eventBroadcastDayofWeek" => "2",
        "eventBroadcastHourMin" => "1445",
 
        ]
  ]
);