@stordata/vsphere-soapify 0.0.26 → 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
  */
@@ -8,7 +8,8 @@ const ComputeResourceConfigInfo = require('./ComputeResourceConfigInfo'),
8
8
  ClusterDpmHostConfigInfo = require('./ClusterDpmHostConfigInfo'),
9
9
  ClusterDrsVmConfigInfo = require('./ClusterDrsVmConfigInfo'),
10
10
  ClusterGroupInfo = require('./ClusterGroupInfo'),
11
- ClusterRuleInfo = require('./ClusterRuleInfo');
11
+ ClusterRuleInfo = require('./ClusterRuleInfo'),
12
+ VsanClusterConfigInfo = require('./VsanClusterConfigInfo');
12
13
 
13
14
  module.exports = class ClusterConfigInfoEx extends ComputeResourceConfigInfo {
14
15
  static mappings() {
@@ -21,7 +22,8 @@ module.exports = class ClusterConfigInfoEx extends ComputeResourceConfigInfo {
21
22
  drsConfig: ClusterDrsConfigInfo,
22
23
  drsVmConfig: ClusterDrsVmConfigInfo.ArrayOf,
23
24
  group: ClusterGroupInfo.ArrayOf,
24
- rule: ClusterRuleInfo.ArrayOf
25
+ rule: ClusterRuleInfo.ArrayOf,
26
+ vsanConfigInfo: VsanClusterConfigInfo
25
27
  };
26
28
  }
27
29
  };
@@ -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',
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ const DynamicData = require('./DynamicData'),
4
+ VsanClusterConfigInfoHostDefaultInfo = require('./VsanClusterConfigInfoHostDefaultInfo');
5
+
6
+ module.exports = class VsanClusterConfigInfo extends DynamicData {
7
+ static mappings() {
8
+ return {
9
+ ...super.mappings(),
10
+ enabled: 'xsd:boolean',
11
+ defaultConfig: VsanClusterConfigInfoHostDefaultInfo
12
+ };
13
+ }
14
+ };
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ const DynamicData = require('./DynamicData');
4
+
5
+ module.exports = class VsanClusterConfigInfoHostDefaultInfo extends DynamicData {
6
+ static mappings() {
7
+ return {
8
+ ...super.mappings(),
9
+ autoClaimStorage: 'xsd:boolean',
10
+ uuid: 'xsd:string'
11
+ };
12
+ }
13
+ };
@@ -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
  };
@@ -17991,8 +17991,8 @@
17991
17991
  <complexContent>
17992
17992
  <extension base="vim25:HostHostBusAdapter">
17993
17993
  <sequence>
17994
- <element name="portWorldWideName" type="xsd:long" />
17995
- <element name="nodeWorldWideName" type="xsd:long" />
17994
+ <element name="portWorldWideName" type="xsd:string" />
17995
+ <element name="nodeWorldWideName" type="xsd:string" />
17996
17996
  <element name="portType" type="vim25:FibreChannelPortType" />
17997
17997
  <element name="speed" type="xsd:long" />
17998
17998
  </sequence>
@@ -20661,8 +20661,8 @@
20661
20661
  <complexContent>
20662
20662
  <extension base="vim25:HostTargetTransport">
20663
20663
  <sequence>
20664
- <element name="portWorldWideName" type="xsd:long" />
20665
- <element name="nodeWorldWideName" type="xsd:long" />
20664
+ <element name="portWorldWideName" type="xsd:string" />
20665
+ <element name="nodeWorldWideName" type="xsd:string" />
20666
20666
  </sequence>
20667
20667
  </extension>
20668
20668
  </complexContent>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stordata/vsphere-soapify",
3
- "version": "0.0.26",
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": {
@@ -19,36 +19,36 @@
19
19
  "author": "Stordata <teamdenbas@stordata.fr>",
20
20
  "license": "UNLICENCED",
21
21
  "engines": {
22
- "node": ">= 10"
22
+ "node": ">= 16"
23
23
  },
24
24
  "publishConfig": {
25
25
  "access": "public",
26
26
  "registry": "https://registry.npmjs.org"
27
27
  },
28
28
  "dependencies": {
29
- "axios": "0.21.1",
30
- "debug": "4.3.2",
29
+ "axios": "0.27.2",
30
+ "debug": "4.3.4",
31
31
  "lodash": "4.17.21",
32
- "soap": "0.40.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": "0.0.5",
37
- "chai": "4.3.4",
36
+ "@stordata/eslint-config": "1.0.20220924010720",
37
+ "chai": "4.3.6",
38
38
  "chai-datetime": "1.8.0",
39
- "eslint": "7.30.0",
40
- "eslint-plugin-import": "2.23.4",
41
- "eslint-plugin-json": "3.0.0",
42
- "eslint-plugin-no-only-tests": "2.6.0",
39
+ "eslint": "8.24.0",
40
+ "eslint-plugin-import": "2.26.0",
41
+ "eslint-plugin-json": "3.1.0",
42
+ "eslint-plugin-no-only-tests": "3.0.0",
43
43
  "eslint-plugin-node": "11.1.0",
44
- "grunt": "1.4.1",
44
+ "grunt": "1.5.3",
45
45
  "grunt-env": "1.0.1",
46
- "grunt-eslint": "23.0.0",
46
+ "grunt-eslint": "24.0.0",
47
47
  "grunt-release": "0.14.0",
48
48
  "grunt-simple-mocha": "0.4.1",
49
49
  "mockdate": "3.0.5",
50
- "nock": "13.1.1",
51
- "sinon": "11.1.1",
50
+ "nock": "13.2.9",
51
+ "sinon": "14.0.0",
52
52
  "sinon-chai": "3.7.0"
53
53
  }
54
54
  }
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ const { ClusterComputeResource } = require('../../lib/sdk/managed');
4
+
5
+ require('..')(client => client.getInventoryItems(ClusterComputeResource));