masoudniki/vcenter
Composer 安装命令:
composer require masoudniki/vcenter
包简介
simple sdk for manage and working with vspahre automation api
README 文档
README
SDK for working with vSphere automation API. You can use it to manage ESXI and vCenter powered machines.
Supported Versions
| vCenterApplianceVersion | status | description |
|---|---|---|
7.0 |
supported | |
6.7 |
supported | some of api like ConsoleTicket is not working more information |
| 6.5 | supported |
Installation
It's super easy to use, just run the below command:
composer require masoudniki/vcenter
How to use it
just pass argument to the VmwareApiClient and create an instace:
require "vendor/autoload.php"; $vmware=new \FNDEV\vShpare\VmwareApiClient( "127.0.0.1", [ "username"=>"admin", "password"=>"admin" ], "443", );
Parameters
Host
only the domain name without any protocol and slash charcher or ip address is acceptable
Credentials
You have two options for authentication:
With username and password
you can pass username and password in array for getting session id
[
'username'=>'local@admin',
'password'=>'123456789'
]
Or with Vmware-Api-Session-Id
increasing session timeout in vCenter and pass directly the session id
[
'Vmware-Api-Session-Id'=>$sessionId
]
For the initiation & first time use you can pass username and password and then get the session with getSessionId() method on VmwareApiClient
require "vendor/autoload.php"; $vmware=new \FNDEV\vShpare\VmwareApiClient( "127.0.0.1", "443", [ "username"=>"admin", "password"=>"admin" ], ); $vmware->getSessionId();
Port
the port of vCenterAppliance application default value is: 443
SSL
if you are using self signed certificate pass the path of certificate or set true otherwise if you dont want to check certificate set false
Protocol
if you are running vCenterAppliance on HTTP protocol set http or if you are running it on HTTPS set https
BaseUrl
The main path of REST API default value is: "/rest/vcenter"
AuthUrl
The authetication URL for creating Vmware-Api-Session-Id default value is:"/rest/com/vmware/cis/session"
Client
You can create your guzzle http client and set its configuartion then pass it to VmwaareApiClient
License
Made with ❤️ in IRAN
The MIT License (MIT). Please see License File for more information.
🙋 Contributing
If you find an issue or have a better way to do something, feel free to open an issue, or a pull request. If you use VmwareApiClient in your open source project, create a pull request to provide its URL as a sample application in the README.md file.
❗ Security
If you discover any security-related issues, please email masoud.niki79@gmail.com instead of using the issue tracker.
TODO
- Add other APIs to the SDK
- Writing more tests
- Creating request class for methods that send options like createVm
- Refactoring bad practice
masoudniki/vcenter 适用场景与选型建议
masoudniki/vcenter 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 359 次下载、GitHub Stars 达 5, 最近一次更新时间为 2020 年 08 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「VMware」 「vsphare」 「automation api」 「esexi」 「manage vcenter」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 masoudniki/vcenter 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 masoudniki/vcenter 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 masoudniki/vcenter 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
VMware vCloud SDK for PHP - patched version
Command-line utility for Vtiger CRM.
Historical accounting for contacts
VMware vCloud SDK for PHP - patched version (Forked from Purple-DBU)
MyAdmin VMware VPS provisioning plugin - integrates VMware hypervisor management with the MyAdmin billing and service platform
Extends Mautic Lead Bundle's Lead List (Segment) functionality.
统计信息
- 总下载量: 359
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 5
- 点击次数: 10
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-08-29