- 论坛徽章:
- 0
|
今天想用来管理一下远程的10多台KVM,进行下简单的状态查询,重启虚拟机之类的工作,于是google到了fabric进行远程操作,
安装完fabric后没有什么报错:
root@ubuntu:/home/barney# pip install fabric
Requirement already satisfied (use --upgrade to upgrade): fabric in /usr/local/lib/python2.7/dist-packages
然后测了一下,发现模块内部的函数似乎和网上说的少了很多。。。比如run
>>> from fabric.api import run
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name run
pydoc看了下,发现怎么才这么点。。
Help on package fabric:
NAME
fabric
FILE
/usr/local/lib/python2.7/dist-packages/fabric/__init__.py
PACKAGE CONTENTS
__main__
api
auth
colors
context_managers
contrib (package)
decorators
docs
exceptions
io
job_queue
main
network
operations
sftp
state
task_utils
tasks
thread_handling
utils
python版本是2.7.6
root@ubuntu:/home/barney# python -V
Python 2.7.6
有大神遇到过此类情况么~~~~~
version
(END)
|
|