@stordata/vsphere-soapify 0.0.27 → 0.0.28

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/lib/parser.js CHANGED
@@ -31,7 +31,7 @@ module.exports = class Parser {
31
31
  return parser in this ? this[parser](array) : array.map(item => this.parse(item, type));
32
32
  }
33
33
 
34
- const Type = `${type.charAt(0).toUpperCase()}${type.substr(1)}`,
34
+ const Type = `${type.charAt(0).toUpperCase()}${type.substring(1)}`,
35
35
  parser = `parse${Type}`;
36
36
 
37
37
  // A dedicated parser exists for this type, use it
@@ -105,6 +105,13 @@ module.exports = class Parser {
105
105
  parseObjectContent(val) {
106
106
  return this.parseManagedObjectReference(val.obj, val.propSet);
107
107
  }
108
+
109
+ parseDecimalWorldWideName(val) {
110
+ return BigInt(val) // You know, for 64 bits
111
+ .toString(16) // Because VMWare sends the WWN in decimal
112
+ .toUpperCase() // You know, for matching UCS ones
113
+ .replace(/(..)(..)(..)(..)(..)(..)(..)/, '$1:$2:$3:$4:$5:$6:$7:'); // Ultra-advanced, next-gen, uber-powered RegEx wizardry
114
+ }
108
115
  };
109
116
 
110
117
  //
@@ -59,7 +59,7 @@ module.exports = class Instance {
59
59
  * Used to avoid requesting all sub-properties of an object.
60
60
  * See http://www.doublecloud.org/2010/04/invalid-property-a-trick-with-vsphere-propertycollector/ for a nice explanation
61
61
  * of why this might happen to you for some entities...
62
- * As a general rule, set this to `true` for inherited Data Objects (.e.: thoses that don't directly extend {@link DynamicData}
62
+ * As a general rule, set this to `true` for inherited Data Objects (.e.: those that don't directly extend {@link DynamicData}
63
63
  *
64
64
  * @returns {Boolean} Whether the library should request this object in full, or ask for all sub-properties
65
65
  */
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const HostHostBusAdapter = require('./HostHostBusAdapter');
4
+
5
+ module.exports = class HostBlockHba extends HostHostBusAdapter {};
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ const HostHostBusAdapter = require('./HostHostBusAdapter');
4
+
5
+ module.exports = class HostFibreChannelHba extends HostHostBusAdapter {
6
+
7
+ static mappings() {
8
+ return {
9
+ ...super.mappings(),
10
+ nodeWorldWideName: 'DecimalWorldWideName',
11
+ portWorldWideName: 'DecimalWorldWideName',
12
+ portType: 'FibreChannelPortType',
13
+ speed: 'xsd:long'
14
+ };
15
+ }
16
+
17
+ };
@@ -6,8 +6,8 @@ module.exports = class HostFibreChannelTargetTransport extends HostTargetTranspo
6
6
  static mappings() {
7
7
  return {
8
8
  ...super.mappings(),
9
- nodeWorldWideName: 'xsd:string',
10
- portWorldWideName: 'xsd:string'
9
+ nodeWorldWideName: 'DecimalWorldWideName',
10
+ portWorldWideName: 'DecimalWorldWideName'
11
11
  };
12
12
  }
13
13
  };
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const HostHostBusAdapter = require('./HostHostBusAdapter');
4
+
5
+ module.exports = class HostParallelScsiHba extends HostHostBusAdapter {};
@@ -34,9 +34,9 @@ module.exports = class VirtualMachineConfigInfo extends DynamicData {
34
34
  name: 'xsd:string',
35
35
  npivDesiredNodeWwns: 'xsd:short',
36
36
  npivDesiredPortWwns: 'xsd:short',
37
- npivNodeWorldWideName: 'ArrayOfLong',
37
+ npivNodeWorldWideName: 'ArrayOfDecimalWorldWideName',
38
38
  npivOnNonRdmDisks: 'xsd:boolean',
39
- npivPortWorldWideName: 'ArrayOfLong',
39
+ npivPortWorldWideName: 'ArrayOfDecimalWorldWideName',
40
40
  npivTemporaryDisabled: 'xsd:boolean',
41
41
  npivWorldWideNameType: 'xsd:string',
42
42
  swapPlacement: 'xsd:string',
@@ -249,5 +249,8 @@ module.exports = {
249
249
  HostPlugStoreTopologyTarget: require('./HostPlugStoreTopologyTarget'),
250
250
  HostFileSystemVolumeInfo: require('./HostFileSystemVolumeInfo'),
251
251
  HostFileSystemMountInfo: require('./HostFileSystemMountInfo'),
252
- RetrieveOptions: require('./RetrieveOptions')
252
+ RetrieveOptions: require('./RetrieveOptions'),
253
+ HostBlockHba: require('./HostBlockHba'),
254
+ HostFibreChannelHba: require('./HostFibreChannelHba'),
255
+ HostParallelScsiHba: require('./HostParallelScsiHba')
253
256
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stordata/vsphere-soapify",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "description": "A NodeJS abstraction layer for the vSphere SOAP API",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,17 +29,17 @@
29
29
  "axios": "0.27.2",
30
30
  "debug": "4.3.4",
31
31
  "lodash": "4.17.21",
32
- "soap": "0.43.0",
33
- "tough-cookie": "4.0.0"
32
+ "soap": "0.45.0",
33
+ "tough-cookie": "4.1.2"
34
34
  },
35
35
  "devDependencies": {
36
- "@stordata/eslint-config": "1.0.20220507000753",
36
+ "@stordata/eslint-config": "1.0.20220924010720",
37
37
  "chai": "4.3.6",
38
38
  "chai-datetime": "1.8.0",
39
- "eslint": "8.15.0",
39
+ "eslint": "8.24.0",
40
40
  "eslint-plugin-import": "2.26.0",
41
41
  "eslint-plugin-json": "3.1.0",
42
- "eslint-plugin-no-only-tests": "2.6.0",
42
+ "eslint-plugin-no-only-tests": "3.0.0",
43
43
  "eslint-plugin-node": "11.1.0",
44
44
  "grunt": "1.5.3",
45
45
  "grunt-env": "1.0.1",
@@ -47,7 +47,7 @@
47
47
  "grunt-release": "0.14.0",
48
48
  "grunt-simple-mocha": "0.4.1",
49
49
  "mockdate": "3.0.5",
50
- "nock": "13.2.4",
50
+ "nock": "13.2.9",
51
51
  "sinon": "14.0.0",
52
52
  "sinon-chai": "3.7.0"
53
53
  }