def execute(p) : print ' 2. Display bridge inventory.' print p try: bridge_info = vfm.py_vfm_bd_select_inventory(p) except StandardError, e: print "ERROR ! " ,e
def reg2(): print """\nRegression Test 2: 1. Display bridge inventory. """ input = {} bridge_info = vfm.py_vfm_bd_select_inventory(input) print bridge_info
def execute(p): print ' 2. Display bridge inventory.' print p try: bridge_info = vfm.py_vfm_bd_select_inventory(p) except StandardError, e: print "ERROR ! ", e
def reg2(): print """\nRegression Test 2: 1. Display bridge inventory. """ input = {} bridge_info = vfm.py_vfm_bd_select_inventory(input) print bridge_info
def _get_bridge_from_db(output, mode, bridge_id): # Get all the attributes from the database ad #if bridge_id == "ALL": #elif bridge_id != "ALL": input = {} try: bridge_info = vfm.py_vfm_bd_select_inventory(input) #print bridge_info except e: print e for row in bridge_info: #print row, "\n" each_row = bridge_info[row] _bridge_select(output, each_row['desc'], each_row['state'],each_row['running_mode'],each_row['firmware_version'],each_row['vfm_guid'],each_row['num_gw_modules'],each_row['gw_module_index'],each_row['last_keep_alive']) return output
def _get_bridge_from_db(output, mode, bridge_id): # Get all the attributes from the database ad #if bridge_id == "ALL": #elif bridge_id != "ALL": input = {} try: bridge_info = vfm.py_vfm_bd_select_inventory(input) #print bridge_info except e: print e for row in bridge_info: #print row, "\n" each_row = bridge_info[row] _bridge_select(output, each_row['desc'], each_row['state'], each_row['running_mode'], each_row['firmware_version'], each_row['vfm_guid'], each_row['num_gw_modules'], each_row['gw_module_index'], each_row['last_keep_alive']) return output
import sys sys.path.append( '/home/jiren/shailesh/pluto/src/vps/vfm/vfmapi/pyapi/build/lib.linux-x86_64-2.4' ) sys.path.append('/home/jiren/shailesh/pluto/src/vps/vfm/vfmapi') import vfm print "Result ", vfm.py_vfm_bd_select_inventory() sys.exit(0) dict = {} result = {} dict["name"] = "vadap13" dict["desc"] = "test" dict["protocol"] = 1 vadapter_id = 3 vfabric_id = 1 io_module_id = 2 def vadapter_create(): result = vfm.py_vfm_vadapter_create(dict) def vadapter_edit(): result = vfm.py_vfm_vadapter_edit_general_attr({ 'io_module_id': io_module_id, 'vfabric_id': vfabric_id,
import sys sys.path.append('/home/jiren/shailesh/pluto/src/vps/vfm/vfmapi/pyapi/build/lib.linux-x86_64-2.4') sys.path.append('/home/jiren/shailesh/pluto/src/vps/vfm/vfmapi') import vfm print "Result " , vfm.py_vfm_bd_select_inventory() sys.exit(0) dict = {} result = {} dict["name"] = "vadap13" dict["desc"] = "test" dict["protocol"] = 1 vadapter_id =3 vfabric_id = 1 io_module_id = 2 def vadapter_create(): result = vfm.py_vfm_vadapter_create(dict) def vadapter_edit(): result = vfm.py_vfm_vadapter_edit_general_attr( {'io_module_id' : io_module_id, 'vfabric_id' : vfabric_id, 'id' : vadapter_id}) def vfabric_create():