#NEWLINE# def test_gbp_l3p_neg_5( self ) : #NEWLINE# #INDENT# self . _log . info ( "\n#################################################\nTESTCASE_GBP_L3P_NEG_5: TO CREATE/UPDATE L3POLICY with SUBNET-PREF-LENGTH GREATER than IP-POOL's MASK-LENGTH\nTEST_STEPS::\nCreate a L3Policy with non-default attr, subnet-pref-length > mask-length of pool\nVerify the above L3Policy creation fails\nCreate a L3Policy with default attrs\nUpdate the L3Policy's subnet-pref-length such that subnet-pref-length > mask-length of pool\nVerify the update fails and L3Policy attrs persists with default values\n##################################################\n" ) #NEWLINE# self . _log . info ( '\n## Step 1: Create a L3P with default attribute ##\n' ) #NEWLINE# l3p_uuid = self . gbpcfg . gbp_policy_cfg_all ( 1 , 'l3p' , self . l3p_name ) #NEWLINE# if ( l3p_uuid == 0 ) : #NEWLINE# #INDENT# self . _log . info ( '\n## Step 1: Create L3Policy == Failed' ) #NEWLINE# return 0 #NEWLINE# #UNINDENT# if ( self . gbpcfg . gbp_policy_cfg_all ( 2 , 'l3p' , l3p_uuid , subnet_prefix_length = '4' ) != 0 ) : #NEWLINE# #INDENT# self . _log . info ( "\n## Step 2: Updating L3Policy's Subnet-Prefix-Length > default Mask-length(8) did NOT fail" ) #NEWLINE# return 0 #NEWLINE# #UNINDENT# if ( self . gbpverify . gbp_l2l3ntk_pol_ver_all ( 1 , 'l3p' , l3p_uuid , id = l3p_uuid , name = self . l3p_name , ip_pool = '10.0.0.0/8' , subnet_prefix_length = '24' ) == 0 ) : #NEWLINE# #INDENT# self . _log . info ( '\n## Step 3: L3Policy config did NOT roll back to original default values' ) #NEWLINE# return 0 #NEWLINE# #UNINDENT# if ( self . gbpcfg . gbp_policy_cfg_all ( 1 , 'l3p' , 'new_l3p' , ip_pool = '20.20.20.0/24' , subnet_prefix_length = '16' ) != 0 ) : #NEWLINE# #INDENT# self . _log . info ( '\n## Step 4: Creating L3Policy with Subnet-Prefix-Length > Mask-Length(24) did NOT fail' ) #NEWLINE# return 0 #NEWLINE# #UNINDENT# self . _log . info ( '\nTESTCASE_GBP_L3P_NEG_5: PASSED' ) #NEWLINE# return 1