一个开源的瓦工Python SDK,感兴趣的看下

GitHub地址:
安装
$ pip install bwh
创建实例
from bwh import BwhSdk
bwh = BwhSdk(veid=598375,api_key='private_YJuvhyLXL5RwLJ2q9pVxlqi9')
获取服务器信息
bwh.get_service_info()
获取可以安装的OS列表
bwh.get_available_os()
{'error': 0, 'installed': 'centos-6-x86-bbr', 'templates': ['centos-6-x86', 'centos-6-x86-bbr', 'centos-6-x86_64', 'centos-6-x86_64-bbr', 'centos-7-x86_64', 'centos-7-x86_64-bbr', 'debian-7-x86', 'debian-7-x86_64', 'debian-8-x86', 'debian-8-x86_64', 'debian-9-x86', 'debian-9-x86_64', 'ubuntu-12.04-x86', 'ubuntu-12.04-x86_64', 'ubuntu-14.04-x86', 'ubuntu-14.04-x86_64', 'ubuntu-16.04-x86', 'ubuntu-16.04-x86_64', 'ubuntu-18.04-x86_64']}

发表评论

邮箱地址不会被公开。 必填项已用*标注