Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhoriuchi/vsphere-connect
A modern vSphere Client
https://github.com/bhoriuchi/vsphere-connect
changefeed command event-monitoring modern observable promise reactivex realtime vsphere vsphere-client
Last synced: about 1 month ago
JSON representation
A modern vSphere Client
- Host: GitHub
- URL: https://github.com/bhoriuchi/vsphere-connect
- Owner: bhoriuchi
- License: mit
- Created: 2015-11-03T04:22:33.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2022-12-07T09:45:02.000Z (about 2 years ago)
- Last Synced: 2024-04-14T22:19:19.252Z (9 months ago)
- Topics: changefeed, command, event-monitoring, modern, observable, promise, reactivex, realtime, vsphere, vsphere-client
- Language: JavaScript
- Homepage: http://bhoriuchi.github.io/vsphere-connect
- Size: 2.74 MB
- Stars: 15
- Watchers: 5
- Forks: 4
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# vsphere-connect
A modern vSphere Client
*Currently undergoing a major re-write see `development` branch for current progress*
[Project Page](http://bhoriuchi.github.io/vsphere-connect)
### Summary
vSphere connect is a modern vSphere client that has been re-designed to mimic RethinkDB's ReQL and provide a way to construct powerful and complex requests easily. vsphere-connect also provides pseudo-realtime changefeeds that take advantage of the vSphere `WaitForUpdatesEx` to provided change events through an RxJS Observable### Example
Return a list of VirtualMachines with 2 CPUs
```js
import VConnect from 'vsphere-connect'
let v = VConnect('vcenter.mydomain.com')
.login('[email protected]', 'vmware100')
v.type('vm')
.pluck({
config: {
hardware: {
numCPU: true
}
}
})
.filter(vm => {
return v.expr(vm)('config')('hardware')('numCPU')
.default(0)
.eq(2)
})('name')
.then(console.log)
```### Example
Subscribe to changes on 2 VMs
```js
import VConnect from 'vsphere-connect'
let v = VConnect('vcenter.mydomain.com')
.login('[email protected]', 'vmware100')v.type('vm')
.allData()
.get('vm-10', 'vm-54')
.changes()
.subscribe(
change => {
console.log(change)
},
error => {
console.error(error)
},
() => {
console.log('complete')
}
)
```