与Riverbed Stingray Rest API交互的Python客户端。
pyra的Python项目详细描述
一、二、二、三、三、三、三、三、三、三、四、四、四、四、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六、六。图片::https://badge.fury.io/py/pyray.png
:目标:http://badge.fury.io/py/pyray
…图片:https://travis-ci.org/intr1nsic/pyray.png?branch=master
:目标:https://travis ci.org/intr1nsic/pyray
python客户端与riverbed stingray rest api交互。
*初始版本
*需要stingray api版本2.0
文档
——
http://pyray.readthedocs.org/en/latest/
功能
——
*添加节点模块
*添加测试覆盖范围
用法
==
pyray快速示例:
=client.httpclient('https://1.1.1.1','admin',"password")
connectivity
==
debug
---
可以运行的命令。出于安全原因,用户名和密码不会显示在任何日志中。:
client
cl=client.httpclient('https://1.1.1.1','admin','password',unsecure=true)
查询
===
==
所有池
----
>列出配置的所有池:
来自pyray import client
cl=client.httpclient('https://1.1.1.1','admin','密码')
池=cl.pools.get()
池中池:
打印池
获取特定池
----
获取特定池::
'password')
pool=cl.pools.get(name='pool1')
删除特定池
——
从pyray import client删除特定池:
cl=client.httpclient('https://1.1.1.1','admin',"password")
cl.pools.delete(name="pool1")
get all nodes draining in the pool
----------
to get draining nodes::
from pyray import client
cl=client.httpclient('https://1.1.1.1.1','admin','password')
pool=cl.pools.get(name='pool1')
draining_nodes=pool.draining_nodes
对于draining_nodes中的节点:
print nodes
获取池中所有配置的节点:
从pyray import client
cl=client.httpclient('https://1.1.1.1','admin','password')
pool=cl.pools.get(name='pool1')
对于池中的节点。节点:
打印节点
要从pyray import client
cl=client.httpclient('https://1.1.1.1','admin',''password')
pool=cl.pools.get(name='pool1')
pool.drain_nodes(nodes=['1.2.3.4:80'])
或从pyray import client
cl=client.httpclient('https://1.1.1.1','admin',,'password')
pool=cl.pools.get(name='pool1')
pool.drain_nodes(nodes=pool.nodes)
undrain
----
到池中的undrain节点::
来自pyray import client
cl=client.httpclient('https://1.1.1.1','admin','密码')
pool=cl.pools.get(name='pool1')
pool.undrain_nodes(nodes=['1.2.3.4:80'])
>或从pyray import client
cl=client.httpclient('https://1.1.1.1','admin','"password")
pool=cl.pools.get(name="pool1")
pool.undrain_nodes(nodes=pool.draining_nodes)
查询池中的节点详细信息
======
获取池中所有节点的节点详细信息,包括所有流量管理器::
client
cl=client.httpclient('https://1.1.1.1','admin','password')
pool=cl.pools.get(name='pool1')
nodes=pool.get\u details()
对于节点,节点中的详细信息。iteritems():
print node
print node['statistics']['current戋conn']
完整节点的详细信息:
{u'statistics':
{u'bytes戋from戋node':23776,
u'bytes戋to戋node':3659117,
u'current戋conn':0,
u"当前"请求:0,
u"错误":4,
u"失败":1,
u"空闲"连接:0,
u"新"连接:38,
u"节点"端口:80,
u"池"连接:0,
u"响应"最大:0,
u"响应"平均:0,
u'response\u min':0,
u'state':u'draining',
u'total\u conn':38
}
}
history
----
<0.1.0(2014-01-02)
++++++++++++
:目标:http://badge.fury.io/py/pyray
…图片:https://travis-ci.org/intr1nsic/pyray.png?branch=master
:目标:https://travis ci.org/intr1nsic/pyray
python客户端与riverbed stingray rest api交互。
*初始版本
*需要stingray api版本2.0
文档
——
http://pyray.readthedocs.org/en/latest/
功能
——
*添加节点模块
*添加测试覆盖范围
用法
==
pyray快速示例:
=client.httpclient('https://1.1.1.1','admin',"password")
connectivity
==
debug
---
可以运行的命令。出于安全原因,用户名和密码不会显示在任何日志中。:
client
cl=client.httpclient('https://1.1.1.1','admin','password',unsecure=true)
查询
===
==
所有池
----
>列出配置的所有池:
来自pyray import client
cl=client.httpclient('https://1.1.1.1','admin','密码')
池=cl.pools.get()
池中池:
打印池
获取特定池
----
获取特定池::
'password')
pool=cl.pools.get(name='pool1')
删除特定池
——
从pyray import client删除特定池:
cl=client.httpclient('https://1.1.1.1','admin',"password")
cl.pools.delete(name="pool1")
get all nodes draining in the pool
----------
to get draining nodes::
from pyray import client
cl=client.httpclient('https://1.1.1.1.1','admin','password')
pool=cl.pools.get(name='pool1')
draining_nodes=pool.draining_nodes
对于draining_nodes中的节点:
print nodes
获取池中所有配置的节点:
从pyray import client
cl=client.httpclient('https://1.1.1.1','admin','password')
pool=cl.pools.get(name='pool1')
对于池中的节点。节点:
打印节点
要从pyray import client
cl=client.httpclient('https://1.1.1.1','admin',''password')
pool=cl.pools.get(name='pool1')
pool.drain_nodes(nodes=['1.2.3.4:80'])
或从pyray import client
cl=client.httpclient('https://1.1.1.1','admin',,'password')
pool=cl.pools.get(name='pool1')
pool.drain_nodes(nodes=pool.nodes)
undrain
----
到池中的undrain节点::
来自pyray import client
cl=client.httpclient('https://1.1.1.1','admin','密码')
pool=cl.pools.get(name='pool1')
pool.undrain_nodes(nodes=['1.2.3.4:80'])
>或从pyray import client
cl=client.httpclient('https://1.1.1.1','admin','"password")
pool=cl.pools.get(name="pool1")
pool.undrain_nodes(nodes=pool.draining_nodes)
查询池中的节点详细信息
======
获取池中所有节点的节点详细信息,包括所有流量管理器::
client
cl=client.httpclient('https://1.1.1.1','admin','password')
pool=cl.pools.get(name='pool1')
nodes=pool.get\u details()
对于节点,节点中的详细信息。iteritems():
print node
print node['statistics']['current戋conn']
完整节点的详细信息:
{u'statistics':
{u'bytes戋from戋node':23776,
u'bytes戋to戋node':3659117,
u'current戋conn':0,
u"当前"请求:0,
u"错误":4,
u"失败":1,
u"空闲"连接:0,
u"新"连接:38,
u"节点"端口:80,
u"池"连接:0,
u"响应"最大:0,
u"响应"平均:0,
u'response\u min':0,
u'state':u'draining',
u'total\u conn':38
}
}
history
----
<0.1.0(2014-01-02)
++++++++++++