本人于2009年12月迁移至独立BLOG。
1、欢迎光临运维进行时,希望认识更多志向相同的朋友!
2、本站部分资源来源于网络,如有侵权请及时与我联系!
3、强烈建议使用Firefox、Opera、Safari及IE7以上的浏览器访问,以获得最佳浏览质量!
4、请勿发表与中华人民共和国法律、法规相抵触的言论,谢谢合作!
5、本人发布的文章与评论内容仅代表本人观点。
1、欢迎光临运维进行时,希望认识更多志向相同的朋友!
2、本站部分资源来源于网络,如有侵权请及时与我联系!
3、强烈建议使用Firefox、Opera、Safari及IE7以上的浏览器访问,以获得最佳浏览质量!
4、请勿发表与中华人民共和国法律、法规相抵触的言论,谢谢合作!
5、本人发布的文章与评论内容仅代表本人观点。
* BridgeModule -- Allows for simple network bridge management
-------------------------------------------------------------
功能:操作网桥
方法:
list() Returns a dictionary containing the bridges and their connected interfaces.
add_bridge(brname) Creates a new bridge named brname.
add_interface(brname, ifname) Adds interface ifname to bridge brname.
delete_bridge(brname) Deletes bridge brname.
delete_interface(brname, ifname) Removes interface ifname from bridge brname.
add_promisc_bridge(brname, ifname) Creates a new bridge brname, attaches interface ifname to it and sets the MAC address of the connected interface to FE:FF:FF:FF:FF:FF, so traffic can flow freely through the bridge. This is required for use with Xen.
up_bridge(brname) Marks bridge brname and all it's connected interfaces as up.
down_bridge(brname) Marks bridge brname and all it's connected interfaces as down
-------------------------------------------------------------
-------------------------------------------------------------
功能:操作网桥
方法:
list() Returns a dictionary containing the bridges and their connected interfaces.
add_bridge(brname) Creates a new bridge named brname.
add_interface(brname, ifname) Adds interface ifname to bridge brname.
delete_bridge(brname) Deletes bridge brname.
delete_interface(brname, ifname) Removes interface ifname from bridge brname.
add_promisc_bridge(brname, ifname) Creates a new bridge brname, attaches interface ifname to it and sets the MAC address of the connected interface to FE:FF:FF:FF:FF:FF, so traffic can flow freely through the bridge. This is required for use with Xen.
up_bridge(brname) Marks bridge brname and all it's connected interfaces as up.
down_bridge(brname) Marks bridge brname and all it's connected interfaces as down
-------------------------------------------------------------
★零、常用方法:
多语言脚本需要加utf编码加以识别:
#-*-coding:utf-8-*-
系统方法:
type(s)#查看变量类型
id(s) #查看内存存储ID
dir(s) #查看对象有方法
help(s)#查看s类的完整方法列表。
变量类型转换:
int()
str()
float()
bool()
将字符串False转成bool的False:
a='False'
eval(a)
多语言脚本需要加utf编码加以识别:
#-*-coding:utf-8-*-
系统方法:
type(s)#查看变量类型
id(s) #查看内存存储ID
dir(s) #查看对象有方法
help(s)#查看s类的完整方法列表。
变量类型转换:
int()
str()
float()
bool()
将字符串False转成bool的False:
a='False'
eval(a)