Module Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias FunctionDef arguments args defaults body Assign NameStore Call NameLoad If CompareEq Call AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr keyword Str If CompareEq Call AttributeLoad NameLoad attr Num body Expr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Num decorator_list ClassDef bases NameLoad body Expr Call AttributeLoad NameLoad attr keyword Str keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr Str decorator_list FunctionDef arguments args NameParam NameParam defaults Str body If CompareNotEq NameLoad Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr BinOpMod Str NameLoad For NameStore ListLoad Str Str Str body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Str AttributeLoad NameLoad attr If CompareEq NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num orelse If CompareLt Call NameLoad NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num orelse Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad keyword Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Index Num If BoolOpAnd CompareNotEq NameLoad Num Call NameLoad NameLoad NameLoad body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad keyword BinOpMod Str AttributeLoad NameLoad attr keyword Str keyword Str keyword Str Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad keyword Str keyword NameLoad keyword NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str AttributeLoad NameLoad attr Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Str AttributeLoad NameLoad attr If CompareEq NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num orelse If CompareLt Call NameLoad NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num orelse Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign NameStore SubscriptLoad Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad keyword Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Index Num If BoolOpAnd CompareNotEq NameLoad Num Call NameLoad NameLoad NameLoad body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad keyword BinOpMod Str AttributeLoad NameLoad attr keyword Str keyword Str keyword Str Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad keyword Str keyword NameLoad keyword NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore ListLoad Assign NameStore ListLoad While CompareLt NameLoad NameLoad body Assign NameStore BinOpMod Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad keyword NameLoad If CompareNotEq NameLoad Num body Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num orelse Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad keyword SubscriptLoad NameLoad Index BinOpSub NameLoad Num keyword Str keyword NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str SubscriptLoad NameLoad Index BinOpSub NameLoad Num keyword NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num AugAssignAdd NameStore Num If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str For NameStore NameLoad body If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str Str Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num For NameStore NameLoad body If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num For NameStore NameLoad body If CompareNotEq Call AttributeLoad AttributeLoad NameLoad attr attr Num Str NameLoad Num body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Return Num decorator_list decorator_list If CompareEq NameLoad Str body Expr Call NameLoad
N/A N/A commands N/A logging N/A sys libs config_libs libs utils_libs libs verify_libs main N/A N/A N/A N/A N/A test N/A test_gbp_l2p_func N/A N/A N/A N/A test test_gbp_l2p_func_1 0 N/A N/A N/A N/A test cleanup tc_name TESTCASE_GBP_L2P_FUNC_1 N/A N/A N/A N/A test test_gbp_l2p_func_2 0 N/A N/A N/A N/A test cleanup tc_name TESTCASE_GBP_L2P_FUNC_2 N/A N/A N/A test cleanup N/A N/A N/A utils_libs report_results test_gbp_l2p_func test_results.txt N/A N/A N/A sys exit 1 N/A test_gbp_l2p_func N/A object N/A N/A N/A N/A logging basicConfig format %(asctime)s [%(levelname)s] %(name)s - %(message)s level N/A logging WARNING N/A _log N/A N/A logging getLogger __name__ N/A cmd rm /tmp/test_gbp_l2p_func.log N/A N/A N/A commands getoutput cmd N/A hdlr N/A N/A logging FileHandler /tmp/test_gbp_l2p_func.log N/A formatter N/A N/A logging Formatter %(asctime)s %(levelname)s %(message)s N/A N/A N/A hdlr setFormatter formatter N/A N/A N/A _log addHandler hdlr N/A N/A N/A _log setLevel N/A logging INFO N/A N/A N/A _log setLevel N/A logging DEBUG __init__ N/A N/A self N/A N/A N/A 
        Init def
         N/A N/A N/A N/A self _log info 
## START OF GBP L3_POLICY FUNCTIONALITY TESTSUITE
 N/A N/A self gbpcfg N/A N/A config_libs Gbp_Config N/A N/A self gbpverify N/A N/A verify_libs Gbp_Verify N/A N/A self l3p_name demo_l3p N/A N/A self l2p_name demo_l2p N/A cleanup N/A N/A self tc_name N/A N/A N/A N/A tc_name N/A N/A N/A N/A N/A self _log info N/A %s: FAILED tc_name N/A obj N/A group l2p l3p N/A N/A N/A N/A N/A self gbpcfg gbp_del_all_anyobj obj N/A test_gbp_l2p_func_1 N/A N/A self N/A N/A N/A N/A N/A N/A self _log info 
############################################################
TESTCASE_GBP_L2P_FUNC_1: TO CREATE/VERIFY/DELETE/VERIFY a L2POLICY with DEFAULT ATTRIB VALUE
TEST_STEPS::
Create L2 Policy Object with default attributes
Verify the attributes & value, show & list cmds
Verify the implicit neutron objects and gbp L3P
Delete L2 Policy
Verify that L2P,L3P and implicit neutron objects has got deleted, show & list cmds
##############################################################
 N/A N/A N/A N/A self _log info 
## Step 1: Create L2Policy with default attrib vals##
 N/A uuids N/A N/A N/A self gbpcfg gbp_policy_cfg_all 1 l2p N/A self l2p_name N/A N/A uuids 0 N/A N/A N/A N/A N/A self _log info 
## Step 1: Create L2Policy == Failed N/A 0 N/A N/A N/A N/A len uuids 2 N/A N/A N/A N/A N/A self _log info 
## Step 1:Create L2Policy Failed due to unexpected tuple length
 N/A 0 N/A N/A N/A l2p_uuid def_l3p_uuid N/A N/A uuids N/A 0 N/A uuids N/A 1 N/A N/A N/A N/A self _log info 
## Step 2: Verify L2Policy, default L3Policy, and Implicit Neutron objs N/A N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 0 l2p l2p_uuid N/A self l2p_name 0 N/A N/A N/A N/A N/A self _log info 
## Step 2A: Verify L2Policy using -list option == Failed N/A 0 N/A net_uuid N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 1 l2p l2p_uuid ret default id l2p_uuid name N/A self l2p_name l3_policy_id def_l3p_uuid N/A 1 N/A N/A N/A net_uuid 0 N/A isinstance net_uuid str N/A N/A N/A N/A N/A N/A self gbpverify neut_ver_all net net_uuid name N/A l2p_%s N/A self l2p_name admin_state_up True status ACTIVE shared False 0 N/A N/A N/A N/A N/A self _log info 
## Step 2C: Verify implicit neutron network object == Failed N/A 0 N/A N/A N/A N/A N/A self _log info 
## Step 2B: Verify L2Policy using -show option == Failed N/A 0 N/A N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 1 l3p def_l3p_uuid name default id def_l3p_uuid l2_policies l2p_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 2D: Verify default L3Policy == Failed N/A 0 N/A N/A N/A N/A self _log info 
## Step 3: Delete L2Policy and Verify L2P, default L3P and Implicit Neutron deleted ##
 N/A N/A N/A N/A N/A self gbpcfg gbp_policy_cfg_all 0 l2p N/A self l2p_name 0 N/A N/A N/A N/A N/A self _log info 
## Step 3: Delete L2Policy == Failed N/A 0 N/A N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 1 l2p l2p_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 3A: Verify L2Policy is Deleted using -show option == Failed N/A 0 N/A N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 1 l3p def_l3p_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 3B: Verify default L3Policy is Deleted == Failed N/A 0 N/A N/A N/A N/A N/A self gbpverify neut_ver_all net net_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 3C: Verify Implicit Neutron Network Obj is Deleted == Failed N/A 0 N/A N/A N/A N/A self _log info 
## TESTCASE_GBP_L2P_FUNC_1: PASSED N/A 1 N/A test_gbp_l2p_func_2 N/A N/A self N/A N/A N/A N/A N/A N/A self _log info 
############################################################
TESTCASE_GBP_L2P_FUNC_2: TO CREATE/UPDATE/DELETE/VERIFY a L2POLICY with MULTIPLE PTGs
TEST_STEPS::
Create L2Policy Object with non-default params
Verify the attributes & value, show & list cmds
Create Multiple(n=10) PTGs using the above L2P
Verify the PTGs and L2P are reflecting in each other in the DB
Delete all PTG, L2P
Verify that all Implicit Neutron Net/Subnets, default L3P has got deleted along with PTGs & L2P
##############################################################
 N/A N/A N/A N/A self _log info 
## Step 1: Create L2Policy with default attrib vals##
 N/A uuids N/A N/A N/A self gbpcfg gbp_policy_cfg_all 1 l2p N/A self l2p_name N/A N/A uuids 0 N/A N/A N/A N/A N/A self _log info 
## Step 1: Create L2Policy == Failed N/A 0 N/A N/A N/A N/A len uuids 2 N/A N/A N/A N/A N/A self _log info 
## Step 1:Create L2Policy Failed due to unexpected tuple length
 N/A 0 N/A N/A N/A l2p_uuid def_l3p_uuid N/A N/A uuids N/A 0 N/A uuids N/A 1 N/A N/A N/A N/A self _log info 
## Step 2: Verify L2Policy, default L3Policy, and Implicit Neutron objs N/A net_uuid N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 1 l2p l2p_uuid ret default id l2p_uuid name N/A self l2p_name l3_policy_id def_l3p_uuid N/A 1 N/A N/A N/A net_uuid 0 N/A isinstance net_uuid str N/A N/A N/A N/A N/A N/A self gbpverify neut_ver_all net net_uuid name N/A l2p_%s N/A self l2p_name admin_state_up True status ACTIVE shared False 0 N/A N/A N/A N/A N/A self _log info 
## Step 2A: Verify implicit neutron network object == Failed N/A 0 N/A N/A N/A N/A N/A self _log info 
## Step 2B: Verify L2Policy using -show option == Failed N/A 0 N/A N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 1 l3p def_l3p_uuid name default id def_l3p_uuid l2_policies l2p_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 2C: Verify default L3Policy == Failed N/A 0 N/A N/A N/A N/A self _log info 
## Step 3: Create Multiple(n=10) PTGs using the above L2P
 N/A N/A n i N/A 11 1 N/A ptg_list N/A N/A subnet_list N/A N/A N/A i n N/A N/A ptg_name N/A demo_ptg_%s i N/A uuids N/A N/A N/A self gbpcfg gbp_policy_cfg_all 1 group ptg_name l2_policy l2p_uuid N/A N/A uuids 0 N/A N/A N/A N/A ptg_list append N/A uuids N/A 0 N/A N/A N/A subnet_list append N/A uuids N/A 2 N/A N/A N/A N/A N/A self _log info 
## Step 3: Create Target-Group == Failed N/A 0 N/A N/A N/A N/A N/A self gbpverify gbp_policy_verify_all 1 group ptg_name id N/A ptg_list N/A N/A i 1 shared False l2_policy_id l2p_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 3A: Verify Policy Target-Group using L2P == Failed N/A 0 N/A N/A N/A N/A N/A self gbpverify neut_ver_all subnet N/A subnet_list N/A N/A i 1 network_id net_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 3B: Verify Implicit Neutron Subnet == Failed N/A 0 N/A i 1 N/A N/A N/A N/A N/A self gbpverify gbp_obj_ver_attr_all_values l2p l2p_uuid policy_target_groups ptg_list 0 N/A N/A N/A N/A N/A self _log info 
## Step 3C: Verifying multiple PTGs mapped to L2P == Failed 
 N/A 0 N/A N/A N/A N/A self _log info 
## Step 4: Delete all PTGs and L2P
 N/A ptgid ptg_list N/A N/A N/A N/A N/A N/A self gbpcfg gbp_policy_cfg_all 0 group ptgid 0 N/A N/A N/A N/A N/A self _log info 
## Step 4: Delete Target-Group == Failed N/A 0 N/A N/A N/A N/A N/A self gbpcfg gbp_policy_cfg_all 0 l2p l2p_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 4A: Delete L2Policy == Failed N/A 0 N/A N/A N/A N/A self _log info 
## Step 5: Verify that all Implicit Neutron Objs, Default L3p, PTGs and L2P are deleted
 N/A N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 1 l3p default 0 N/A N/A N/A N/A N/A self _log info 
## Step 5: Verify that default L3P has got auto-deleted == Failed
 N/A 0 N/A N/A N/A N/A N/A self gbpverify gbp_l2l3ntk_pol_ver_all 1 l2p l2p_uuid 0 N/A N/A N/A N/A N/A self _log info 
## Step 5A: Verify that L2P got deleted == Failed
 N/A 0 N/A subnet subnet_list N/A N/A N/A N/A N/A N/A self gbpverify neut_ver_all subnet subnet 0 N/A N/A N/A N/A N/A self _log info 
## Step 5B: Verify that Implicit Neutron Subnet got deleted == Failed
 N/A 0 N/A ptgid ptg_list N/A N/A N/A N/A N/A N/A self gbpverify gbp_policy_verify_all 1 group ptgid 0 N/A N/A N/A N/A N/A self _log info 
## Step 3B: Verify Target-Group is Deleted using -show option == Failed N/A 0 N/A N/A N/A N/A self _log info 
## TESTCASE_GBP_L2P_FUNC_2: PASSED N/A 1 N/A N/A N/A N/A __name__ __main__ N/A N/A N/A main