#NEWLINE# def test_notify_chain_update_hook( self ) : #NEWLINE# #INDENT# update_hook = self . driver . notify_chain_parameters_updated = mock . Mock ( ) #NEWLINE# prof = self . create_service_profile ( service_type = 'LOADBALANCER' , vendor = self . SERVICE_PROFILE_VENDOR ) [ 'service_profile' ] #NEWLINE# node = self . create_servicechain_node ( service_profile_id = prof [ 'id' ] , config = self . DEFAULT_LB_CONFIG , expected_res_status = 201 ) [ 'servicechain_node' ] #NEWLINE# spec = self . create_servicechain_spec ( nodes = [ node [ 'id' ] ] , expected_res_status = 201 ) [ 'servicechain_spec' ] #NEWLINE# action = self . create_policy_action ( action_type = 'REDIRECT' , action_value = spec [ 'id' ] ) #NEWLINE# classifier = self . create_policy_classifier ( port_range = 80 , protocol = 'tcp' , direction = 'bi' ) [ 'policy_classifier' ] #NEWLINE# rule = self . create_policy_rule ( policy_actions = [ action [ 'policy_action' ] [ 'id' ] ] , policy_classifier_id = classifier [ 'id' ] ) [ 'policy_rule' ] #NEWLINE# prs = self . create_policy_rule_set ( policy_rules = [ classifier [ 'id' ] ] ) [ 'policy_rule_set' ] #NEWLINE# self . create_policy_target_group ( provided_policy_rule_sets = { #NEWLINE# #INDENT# prs [ 'id' ] : '' , #NEWLINE# #UNINDENT# } ) #NEWLINE# self . create_policy_target_group ( consumed_policy_rule_sets = { #NEWLINE# #INDENT# prs [ 'id' ] : '' , #NEWLINE# #UNINDENT# } ) #NEWLINE# instances = self . _list ( 'servicechain_instances' ) [ 'servicechain_instances' ] #NEWLINE# self . assertEqual ( 1 , len ( instances ) ) #NEWLINE# self . update_policy_classifier ( classifier [ 'id' ] , port_range = 22 ) #NEWLINE# update_hook . assert_called_with ( mock . ANY )