Skip to content

Commit

Permalink
Merge pull request #593 from keedya/master
Browse files Browse the repository at this point in the history
Add switchconnection to the catalog inventory in wsman
  • Loading branch information
keedya authored Apr 4, 2018
2 parents 9b4f98c + 0efdb4f commit fb3e66c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/jobs/dell-wsman-inventory.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function DellWsmanInventoryJobFactory(
if(self.nodeType === 'enclosure'){
self.inventories = ['details'];
} else if(self.nodeType === 'compute'){
self.inventories = ['hardware', 'software', 'nics', 'manager'];
self.inventories = ['hardware', 'software', 'nics', 'manager', 'switchconnection'];
} else {
throw new Error('Inventory collection for node type (' + self.nodeType + ') is not implemented.');
}
Expand Down Expand Up @@ -127,7 +127,7 @@ function DellWsmanInventoryJobFactory(
var requestUri = '';
if(self.nodeType === 'compute'){
requestUri = self.dellConfigs.services.inventory.serverCallback;
if(type === 'manager'){ // special case for manager endpoint - use 2.0 api
if(type === 'manager' || type ==='switchconnection'){ // special case for manager endpoint - use 2.0 api
requestUri = requestUri.replace(/1.0/, '2.0');
}
} else if(self.nodeType === 'enclosure'){
Expand Down
2 changes: 1 addition & 1 deletion spec/lib/jobs/dell-wsman-inventory-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ describe(require('path').basename(__filename), function() {
configuration.get.withArgs('dell').returns(dellConfigs);
wsmanBaseJob.prototype.getIpAddress.resolves('172.31.128.73');
return wsmanInventoryJob._initJob().then(function() {
expect(wsmanInventoryJob.inventories.length).to.equal(4);
expect(wsmanInventoryJob.inventories.length).to.equal(5);
expect(wsmanInventoryJob.inventories[0]).to.equal('hardware');
});
});
Expand Down

0 comments on commit fb3e66c

Please sign in to comment.