@itentialopensource/adapter-netbox_v33 2.1.6 → 2.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/adapter.js CHANGED
@@ -49071,6 +49071,7 @@ via a protocol such as LLDP. Two query parameters must be included in the reques
49071
49071
  * @name deleteIpamIpAddresses
49072
49072
  * @summary ipam_ip-addresses_bulk_delete
49073
49073
  *
49074
+ * @param {Array} data - data param
49074
49075
  * @param {getCallback} callback - a callback function to return the result
49075
49076
  * @return {object} results - An object containing the response of the action
49076
49077
  *
@@ -49079,7 +49080,7 @@ via a protocol such as LLDP. Two query parameters must be included in the reques
49079
49080
  * @task true
49080
49081
  */
49081
49082
  /* YOU CAN CHANGE THE PARAMETERS YOU TAKE IN HERE AND IN THE pronghorn.json FILE */
49082
- deleteIpamIpAddresses(callback) {
49083
+ deleteIpamIpAddresses(data, callback) {
49083
49084
  const meth = 'adapter-deleteIpamIpAddresses';
49084
49085
  const origin = `${this.id}-${meth}`;
49085
49086
  log.trace(origin);
@@ -49091,12 +49092,17 @@ via a protocol such as LLDP. Two query parameters must be included in the reques
49091
49092
  }
49092
49093
 
49093
49094
  /* HERE IS WHERE YOU VALIDATE DATA */
49095
+ if (data === undefined || data === null || data === '') {
49096
+ const errorObj = this.requestHandlerInst.formatErrorObject(this.id, meth, 'Missing Data', ['data'], null, null, null);
49097
+ log.error(`${origin}: ${errorObj.IAPerror.displayString}`);
49098
+ return callback(null, errorObj);
49099
+ }
49094
49100
 
49095
49101
  /* HERE IS WHERE YOU SET THE DATA TO PASS INTO REQUEST */
49096
49102
  const queryParamsAvailable = {};
49097
49103
  const queryParams = {};
49098
49104
  const pathVars = [];
49099
- const bodyVars = {};
49105
+ const bodyVars = data;
49100
49106
 
49101
49107
  // loop in template. long callback arg name to avoid identifier conflicts
49102
49108
  Object.keys(queryParamsAvailable).forEach((thisKeyInQueryParamsAvailable) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itentialopensource/adapter-netbox_v33",
3
- "version": "2.1.6",
3
+ "version": "2.1.7",
4
4
  "description": "This adapter integrates with system described as: Netbox v3.3",
5
5
  "main": "adapter.js",
6
6
  "wizardVersion": "2.44.7",
package/pronghorn.json CHANGED
@@ -121709,7 +121709,19 @@
121709
121709
  "name": "deleteIpamIpAddresses",
121710
121710
  "summary": "ipam_ip-addresses_bulk_delete",
121711
121711
  "description": "ipam_ip-addresses_bulk_delete",
121712
- "input": [],
121712
+ "input": [
121713
+ {
121714
+ "name": "data",
121715
+ "type": "array",
121716
+ "info": "List of IP Objects",
121717
+ "required": true,
121718
+ "schema": {
121719
+ "required": [
121720
+ ],
121721
+ "type": "object"
121722
+ }
121723
+ }
121724
+ ],
121713
121725
  "output": {
121714
121726
  "name": "result",
121715
121727
  "type": "object",
Binary file
@@ -1,10 +1,10 @@
1
1
  {
2
- "version": "2.0.0",
3
- "configLines": 185559,
2
+ "version": "2.1.6",
3
+ "configLines": 185571,
4
4
  "scriptLines": 1783,
5
- "codeLines": 79698,
5
+ "codeLines": 79704,
6
6
  "testLines": 52921,
7
7
  "testCases": 2758,
8
- "totalCodeLines": 134402,
8
+ "totalCodeLines": 134408,
9
9
  "wfTasks": 896
10
10
  }
@@ -22109,7 +22109,7 @@ describe('[integration] Netbox_v33 Adapter Test', () => {
22109
22109
  describe('#deleteIpamIpAddresses - errors', () => {
22110
22110
  it('should work if integrated but since no mockdata should error when run standalone', (done) => {
22111
22111
  try {
22112
- a.deleteIpamIpAddresses((data, error) => {
22112
+ a.deleteIpamIpAddresses([], (data, error) => {
22113
22113
  try {
22114
22114
  if (stub) {
22115
22115
  const displayE = 'Error 400 received on request';