New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

smartos-tools

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartos-tools

Wrapper for tools available in the SmartOS hypervisor global zone. Supports running in the global zone or connecting via SSH.

latest
Source
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

smartos-tools

smartos-tools provides read-only wrappers for the standard SmartOS management tools such as vmadm/nictagadm/sysinfo/zfs/zpool. It attempts to parse as much data as possible into native Javascript structures.

Also, it does not need to run on the SmartOS host itself as 3 different endpoints are supported:

  • 'Local' executes the commands locally via the node 'child_process' module
  • 'NativeSsh' leverages a local installation of SSH (relies on the SSH bin being in PATH) to execute commands remotely
  • 'BuiltinSsh' uses the ssh2 library (native node.js SSH implmenetation) to execute commands remotely.

The primary difference between Native and Builtin SSH will be performance and integrated authentication. NativeSsh will behave as though the user that node is running under has attempted to execute the commands. The implication is typically that the destination host must be in the KnownHosts file for the user (or globally) and public key authentication should already be functional. BuiltinSsh will also work with public key authentication but also supports password auth. BuiltinSsh requires the user to supply the private key as either a string or buffer (as per ssh2 docs).

Usage

var smartos = require('smartos-tools');

var endpoint = smartos.Endpoint.BuiltinSsh({
  host: '127.0.0.1',
  username: 'root',
  password: 'password'
});

var host = smartos.Host(endpoint);

host.vmadm.list(null, function(err, vmList){
  var vm = vmList[0];
  host.vmadm.get(vm.uuid, false, function(err, vmPayload){

  });
});

Installation

npm install smartos-tools

License

MIT.

Bugs

See https://github.com/davefinster/smartos-tools/issues.

Keywords

smartos

FAQs

Package last updated on 23 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts