New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@stordata/vsphere-soapify

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stordata/vsphere-soapify - npm Package Compare versions

Comparing version

to
0.0.15

21

lib/sdk/managed/PerformanceManager.js
'use strict';
const ManagedEntity = require('./ManagedEntity'),
const _ = require('lodash'),
ManagedEntity = require('./ManagedEntity'),
PerformanceDescription = require('../data/PerformanceDescription'),

@@ -20,12 +21,18 @@ PerfProviderSummary = require('../data/PerfProviderSummary'),

preparePerfCounters(counters) {
function findCounter({ groupInfo, nameInfo, rollupType, unitInfo }, counter) {
const [group, name, rollup, unit] = counter.split('.');
return groupInfo.key === group && nameInfo.key === name && rollupType === rollup && (!unit || unitInfo.key === unit);
}
return this.withProperties()
.then(properties => properties.perfCounter.reduce((accumulator, data) => {
const counter = `${data.groupInfo.key}.${data.nameInfo.key}.${data.rollupType}`;
.then(({ perfCounter }) => _.reduce(counters, (accumulator, instance, counter) => {
const found = _.find(perfCounter, item => findCounter(item, counter));
if (counter in counters) {
if (found) {
accumulator.counterToId[counter] = {
counterId: data.key,
instance: counters[counter]
counterId: found.key,
instance
};
accumulator.idToCounter[data.key] = counter;
accumulator.idToCounter[found.key] = counter;
}

@@ -32,0 +39,0 @@

{
"name": "@stordata/vsphere-soapify",
"version": "0.0.14",
"version": "0.0.15",
"description": "A NodeJS abstraction layer for the vSphere SOAP API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -6,4 +6,4 @@ 'use strict';

require('..')(client => client.getPerfCounters(HostSystem, {
'cpu.usage.average': '',
'cpu.usage.average.percent': '',
'storageAdapter.read.average': '*'
}));

Sorry, the diff of this file is too big to display