vmw-cli

所属分类:操作系统开发
开发工具:JavaScript
文件大小:129KB
下载次数:0
上传日期:2018-10-10 22:06:18
上 传 者sh-1993
说明:  vmw cli是一个cli客户端,用于登录my.vmware.com并与之交互。允许编程查询和下载V...
(vmw-cli is a CLI client used to login and interact with my.vmware.com. Allows for programmatic query and download of VMware product binaries.)

文件列表:
asciicast (0, 2018-10-11)
asciicast\build-cast.sh (381, 2018-10-11)
asciicast\run.sh (612, 2018-10-11)
asciicast\vmw-cli.find1.cast (4607, 2018-10-11)
asciicast\vmw-cli.find1.cast.svg (36617, 2018-10-11)
asciicast\vmw-cli.install.cast (6801, 2018-10-11)
asciicast\vmw-cli.install.cast.svg (36864, 2018-10-11)
backup-shrinkwrap.json (423, 2018-10-11)
build.sh (140, 2018-10-11)
dockerfile (291, 2018-10-11)
lib (0, 2018-10-11)
lib\examples (0, 2018-10-11)
lib\examples\data.json (197, 2018-10-11)
lib\examples\test-01.js (548, 2018-10-11)
lib\examples\test-02.js (483, 2018-10-11)
lib\examples\test-03.js (453, 2018-10-11)
lib\examples\test-04.js (509, 2018-10-11)
lib\examples\test-05.js (463, 2018-10-11)
lib\extract-files.js (6786, 2018-10-11)
lib\get-file.js (2134, 2018-10-11)
lib\get-index.js (2123, 2018-10-11)
lib\get-product.js (3464, 2018-10-11)
lib\get-solution.js (6423, 2018-10-11)
lib\utils.js (1723, 2018-10-11)
lib\vmw-api.js (6627, 2018-10-11)
lib\vmw-cli.js (2907, 2018-10-11)
lib\xcell.js (918, 2018-10-11)
lib\xtable.js (2846, 2018-10-11)
license (1092, 2018-10-11)
mainIndex.json (707568, 2018-10-11)
npm-shrinkwrap.json (423, 2018-10-11)
package.json (550, 2018-10-11)
run.sh (89, 2018-10-11)

# vmw-cli `vmw-cli` is a CLI client used to login and interact with my.vmware.com. It provides an interface for programmatic query and download of VMware product binaries. Every product. Every version. Every file. #### Configure authentication for my.vmware.com ``` export VMWUSER='' export VMWPASS='' ``` Note: Any download attempts will be restricted to the entitlements afforded by your account. Alternatively, if using `docker` commands, you can pass credentials directly to the container instead. ## Install `vmw-cli` can be installed natively via NPM or consumed using a pre-built docker image. Requested files via the `get` command will be downloaded to current working directory. ### via NPM **vmw-cli requires NodeJS >= 8.x, some older Linux distros need to have NodeJS [manually updated](https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions)** Once installed, `vmw-cli` can be leveraged directly via the `vmw-cli` shell command - see *Usage* below ``` npm install vmw-cli --global ``` ### via Docker run This is where we simply use `docker run` with the required ENV parameters set: ``` docker run -t --rm -e VMWUSER='' -e VMWPASS='' -v ${PWD}:/files apnex/vmw-cli ``` **Where:** - `` is your **my.vmware.com** username - `` is your **my.vmware.com** password - `` is one of [`list`, `index`, `find`, `get`, `json`] - `${PWD}` ENV will resolve to current working directory in BASH for file downloads See **Usage** for examples ### via Docker exec This is where we start the container using `docker run` with the required ENV parameters set. Subsequent commands are then issued using `docker exec` commands. Start the container in background: ``` docker run -itd --name vmw -e VMWUSER='' -e VMWPASS='' -v ${PWD}:/files --entrypoint=sh apnex/vmw-cli ``` **Where:** - `` is your **my.vmware.com** username - `` is your **my.vmware.com** password - `${PWD}` ENV will resolve to current working directory in BASH for file downloads Then issue one or more `docker exec` commands: ``` docker exec -t vmw vmw-cli ``` Clean up docker container when done: ``` docker rm -f vmw ``` See **Usage** for examples Index some files in `productGroup` *OVFTOOL430* and *NSX-T-220* ``` vmw-cli index OVFTOOL430 vmw-cli index NSX-T-220 vmw-cli get VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle vmw-cli get nsx-unified-appliance-2.2.0.0.0.8680778.ova ``` ## Usage #### vmw-cli list The `list` command displays the current high-level `` available on my.vmware.com. You will need to first generate an index of files under at least 1 solution or productGroup before proceeding with other commands. ``` $ vmw-cli list vmware-workstation-pro vmware-workstation-player vmware-workspace vmware-workspace-one vmware-vsphere vmware-vsphere-with-operations-management vmware-vsphere-storage-appliance vmware-vsphere-integrated-containers vmware-vsphere-hypervisor-esxi vmware-vsphere-data-protection-advanced vmware-vsan -- -- vmware-photon-platform vmware-nsx-t-data-center vmware-nsx-sd-wan vmware-nsx-data-center-for-vsphere vmware-nsx-cloud vmware-integrated-openstack ``` #### vmw-cli index The `index` command creates an index of files available to you as `fileIndex.json`. You will need to use one of the `` entries available from the `list` command. The index intentionally creates duplicate entries for files, as a `product` may map to multiple `solutions`. You can issue the `index` command multiple times to generate a consolidated index of all files. **WARNING: Some solutions such as `vmware-vsphere` and `vmware-vsan` contain a large number of products, and could take 10-15 mins to index** ``` $ vmw-cli index vmware-nsx-t-data-center Updating [fileIndex.json] for all permitted downloads in [vmware-nsx-t-data-center] ... file[/state/index.json.session] does not exist, writing... Synching delicious cookies from [https://my.vmware.com] Offering up afforementioned snacks as a sacrifice to [https://my.vmware.com/oam/server/auth_cred_submit] Pulling landing index.json [https://my.vmware.com/group/vmware/downloads] Resolving files in solution [vmware-nsx-t-data-center] [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-220&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-461-NSX&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRNI-380&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-PKS-221&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-PKS-220&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-PKS-214&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-PKS-213&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-PKS-212&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-PKS-2101&productId=673 -- -- [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-430-OSS&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-110&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-430-NSX&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-110-OPENSTACK&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-430-OSS&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-400-OSS&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-110-OSS&productId=631 Merging [vmware-nsx-t-data-center] into [fileIndex.json] ... timer: 19227.940ms ``` You can also issue the `index` command for a single `productGroup` if you provide the correct `productGroup` name. Some examples of this usage are below. ## Examples #### Index ovftool ``` $ vmw-cli index OVFTOOL430 Updating [fileIndex.json] for all permitted downloads in [OVFTOOL430] ... [mainIndex.json] downloading... [=================================================>] 100% 0.0s 351 KB/s 00.68/00.68 MB file[/usr/lib/node_modules/vmw-cli/lib/index.json.session] does not exist, writing... Synching delicious cookies from [https://my.vmware.com] Offering up afforementioned snacks as a sacrifice to [https://my.vmware.com/oam/server/auth_cred_submit] Pulling landing index.json [https://my.vmware.com/group/vmware/downloads] [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=OVFTOOL430&productId=734 Merging [OVFTOOL430] into [fileIndex.json] ... timer: 16230.838ms ``` #### View files ``` $ vmw-cli find fileName:ovftool.*x86_***.bundle Loading available solutions in [fileIndex.json] ... solution productGroup productType version fileName fileDate fileSize fileType download ----------------------------------------- ------------ --------------- ------- ---------------------------------------------- ---------- -------- -------- -------- vmware-workspace-one OVFTOOL430 Drivers & Tools 4.3.0 VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle 2018-04-17 34.79 MB bundle yes vmware-vsphere OVFTOOL430 Drivers & Tools 4.3.0 VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle 2018-04-17 34.79 MB bundle yes vmware-vsphere-with-operations-management OVFTOOL430 Drivers & Tools 4.3.0 VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle 2018-04-17 34.79 MB bundle yes vmware-vsan OVFTOOL430 Drivers & Tools 4.3.0 VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle 2018-04-17 34.79 MB bundle yes vmware-vcloud-nfv-openstack-edition OVFTOOL430 Drivers & Tools 4.3.0 VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle 2018-04-17 34.79 MB bundle yes vmware-horizon OVFTOOL430 Drivers & Tools 4.3.0 VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle 2018-04-17 34.79 MB bundle yes vmware-horizon-apps OVFTOOL430 Drivers & Tools 4.3.0 VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle 2018-04-17 34.79 MB bundle yes [ 7/35 ] entries - filter [ fileName:ovftool.*x86_***.bundle ] ``` #### Download ovftool ``` $ vmw-cli get VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle Loading available solutions in [fileIndex.json] ... Session file[/usr/lib/node_modules/vmw-cli/lib/index.json] [265] younger than [600] seconds... { "name": "VMware OVF Tool for Linux ***-bit", "fileName": "VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle", "fileDate": "2018-04-17", "fileSize": "34.79 MB", "fileType": "bundle", "buildNum": "7948156", "descr": "Download VMware OVF Tool installer for Linux ***-bit ", "md5sum": "d0dd9006d720a26278b94591a4111457", "sha1sum": "63fb48e2***3187a13a239376c3f25d587ab04468", "sha256sum": "d327c8c7ebaac7432a589b1207410889d00c1ffd3fe18fa751b14459***4de***0", "download": { "downloadGroupCode": "OVFTOOL430", "downloadFileId": "d0dd9006d720a26278b94591a4111457", "vmware": "downloadBinary", "productId": "734" } } [VMware-ovftool-4.3.0-7948156-lin.x86_***.bundle] downloading... [=================================================>] 100% 0.0s 337 KB/s 3***7/3***7 MB MD5 MATCH: local[ d0dd9006d720a26278b94591a4111457 ] remote [ d0dd9006d720a26278b94591a4111457 ] ``` #### Index NSX-T ``` $ vmw-cli index vmware-nsx-t-data-center Updating [fileIndex.json] for all permitted downloads in [vmware-nsx-t-data-center] ... Session file[/usr/lib/node_modules/vmw-cli/lib/index.json] [555] younger than [600] seconds... Resolving files in solution [vmware-nsx-t-data-center] [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-220&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-461-NSX&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRNI-380&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-PKS-212&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-PKS-2101&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRNI-380-OSS&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-461-OSS&productId=673 -- -- [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-430-OSS&productId=673 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-110&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-430-NSX&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-110-OPENSTACK&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-430-OSS&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=VRLI-400-OSS&productId=631 [FETCH]: https://my.vmware.com/group/vmware/details?downloadGroup=NSX-T-110-OSS&productId=631 Merging [vmware-nsx-t-data-center] into [fileIndex.json] ... timer: 17695.387ms ``` #### View files ``` $ vmw-cli find fileName:unified,fileType:ova Loading available solutions in [fileIndex.json] ... solution productGroup productType version fileName fileDate fileSize fileType download ----------------------------------- ------------ ---------------- ------- ------------------------------------------- ---------- -------- -------- -------- vmware-vcloud-nfv-openstack-edition NSX-T-220 Product Binaries 2.2.0 nsx-unified-appliance-2.2.0.0.0.8680778.ova 2018-06-05 3.52 GB ova yes vmware-nsx-t-data-center NSX-T-220 Product Binaries 2.2.0 nsx-unified-appliance-2.2.0.0.0.8680778.ova 2018-06-05 3.52 GB ova yes [ 2/504 ] entries - filter [ fileName:unified,fileType:ova ] ``` #### Download unified-appliance ``` $ vmw-cli get nsx-unified-appliance-2.2.0.0.0.8680778.ova Loading available solutions in [fileIndex.json] ... Session file[/usr/lib/node_modules/vmw-cli/lib/index.json] [552] younger than [600] seconds... { "name": "NSX Manager for VMware ESXi", "fileName": "nsx-unified-appliance-2.2.0.0.0.8680778.ova", "fileDate": "2018-06-05", "fileSize": "3.52 GB", "fileType": "ova", "buildNum": "8680772", "descr": "This is the NSX Manager Appliance in Open Virtualization Appliance Format (OVA)....", "md5sum": "a4027f3a6b10c18f7ec4365720b348d0", "sha1sum": "482e142d08cd14f2fef8ad2f39b36af3297af2cd", "sha256sum": "e2620a14f14a7b43990f92ee***790c44c8217acc043d663abbef1cb6d7***a0ac", "download": { "downloadGroupCode": "NSX-T-220", "downloadFileId": "a4027f3a6b10c18f7ec4365720b348d0", "vmware": "downloadBinary", "productId": "673" } } [nsx-unified-appliance-2.2.0.0.0.8680778.ova] downloading... [=================================================] 100% 0.0s 914 KB/s 03.78/03.78 GB MD5 MATCH: local[ a4027f3a6b10c18f7ec4365720b348d0 ] remote [ a4027f3a6b10c18f7ec4365720b348d0 ] ``` ## License MIT [Andrew Obersnel](https://github.com/apnex)

近期下载者

相关文件


收藏者