ipdb 在 openstack 中使用

简介:

1, 安装ipdb

   easy_install ipdb or pip install ipdb

2,  使用ipdb

       net_manager = utils.import_object(FLAGS.network_manager)

      import ipdb;ipdb.set_trace() # 打断点,调试


root@roto-virtual-machine:~/nova/api/openstack/compute/contrib# nova-manage network create private --fixed_range_v4=10.14.23.0/24 --num_networks=1 --network_size=32

> /usr/bin/nova-manage(795)create()

   794         import ipdb;ipdb.set_trace()

--> 795         net_manager.create_networks(context.get_admin_context(),

   796                                     label=label,


ipdb> help


Documented commands (type help <topic>):

========================================

EOF    bt         cont      enable  jump  pdef   r        tbreak   w    

a      c          continue  exit    l     pdoc   restart  u        whatis

alias  cl         d         h       list  pinfo  return   unalias  where

args   clear      debug     help    n     pp     run      unt    

b      commands   disable   ignore  next  q      s        until  

break  condition  down      j       p     quit   step     up    


Miscellaneous help topics:

==========================

exec  pdb


Undocumented commands:

======================

retval  rv


ipdb>



3, nova-network 使用ipdb

    ipdb   /usr/bin/python /usr/bin/nova-network --flagfile=/etc/nova/nova.conf



本文转自 swq499809608 51CTO博客,原文链接:http://blog.51cto.com/swq499809608/1288453
相关文章
|
存储 API 虚拟化
|
6月前
|
存储 API Swift
一文秒懂什么是OpenStack?
一文秒懂什么是OpenStack?
209 0
|
6月前
|
存储 监控 调度
OpenStack
OpenStack
151 0
|
Ubuntu 关系型数据库 MySQL
openstack4j
Identity // V2 authentication OSClientV2 os = OSFactory.builderV2() .endpoint("http://127.
1025 0
|
存储 数据库 云计算