@@ -3036,11 +3036,13 @@ def test__find_lb_in_ls_wrong_ref(self):
3036
3036
def test__find_ls_for_lr (self ):
3037
3037
p1 = fakes .FakeOVNPort .create_one_port (attrs = {
3038
3038
'gateway_chassis' : [],
3039
+ 'ha_chassis_group' : [],
3039
3040
'external_ids' : {
3040
3041
ovn_const .OVN_NETWORK_NAME_EXT_ID_KEY : 'foo1' },
3041
3042
'networks' : ["10.0.0.1/24" ]})
3042
3043
p2 = fakes .FakeOVNPort .create_one_port (attrs = {
3043
3044
'gateway_chassis' : [],
3045
+ 'ha_chassis_group' : [],
3044
3046
'external_ids' : {
3045
3047
ovn_const .OVN_NETWORK_NAME_EXT_ID_KEY : 'foo2' },
3046
3048
'networks' : ["10.0.10.1/24" ]})
@@ -3052,11 +3054,13 @@ def test__find_ls_for_lr(self):
3052
3054
def test__find_ls_for_lr_net_not_found (self ):
3053
3055
p1 = fakes .FakeOVNPort .create_one_port (attrs = {
3054
3056
'gateway_chassis' : [],
3057
+ 'ha_chassis_group' : [],
3055
3058
'external_ids' : {
3056
3059
ovn_const .OVN_NETWORK_NAME_EXT_ID_KEY : 'foo1' },
3057
3060
'networks' : ["10.0.0.1/24" ]})
3058
3061
p2 = fakes .FakeOVNPort .create_one_port (attrs = {
3059
3062
'gateway_chassis' : [],
3063
+ 'ha_chassis_group' : [],
3060
3064
'external_ids' : {},
3061
3065
'networks' : ["10.0.10.1/24" ]})
3062
3066
self .router .ports .append (p2 )
@@ -3067,11 +3071,13 @@ def test__find_ls_for_lr_net_not_found(self):
3067
3071
def test__find_ls_for_lr_different_ip_version (self ):
3068
3072
p1 = fakes .FakeOVNPort .create_one_port (attrs = {
3069
3073
'gateway_chassis' : [],
3074
+ 'ha_chassis_group' : [],
3070
3075
'external_ids' : {
3071
3076
ovn_const .OVN_NETWORK_NAME_EXT_ID_KEY : 'foo1' },
3072
3077
'networks' : ["10.0.0.1/24" ]})
3073
3078
p2 = fakes .FakeOVNPort .create_one_port (attrs = {
3074
3079
'gateway_chassis' : [],
3080
+ 'ha_chassis_group' : [],
3075
3081
'external_ids' : {
3076
3082
ovn_const .OVN_NETWORK_NAME_EXT_ID_KEY : 'foo2' },
3077
3083
'networks' : ["fdaa:4ad8:e8fb::/64" ]})
@@ -3085,6 +3091,18 @@ def test__find_ls_for_lr_different_ip_version(self):
3085
3091
def test__find_ls_for_lr_gw_port (self ):
3086
3092
p1 = fakes .FakeOVNPort .create_one_port (attrs = {
3087
3093
'gateway_chassis' : ['foo-gw-chassis' ],
3094
+ 'ha_chassis_group' : [],
3095
+ 'external_ids' : {
3096
+ ovn_const .OVN_NETWORK_NAME_EXT_ID_KEY : 'foo1' },
3097
+ 'networks' : ["10.0.0.1/24" ]})
3098
+ self .router .ports .append (p1 )
3099
+ result = self .helper ._find_ls_for_lr (self .router , n_const .IP_VERSION_4 )
3100
+ self .assertListEqual ([], result )
3101
+
3102
+ def test__find_ls_for_lr_gw_port_ha_chassis_group (self ):
3103
+ p1 = fakes .FakeOVNPort .create_one_port (attrs = {
3104
+ 'gateway_chassis' : [],
3105
+ 'ha_chassis_group' : 'foo-chassis-group' ,
3088
3106
'external_ids' : {
3089
3107
ovn_const .OVN_NETWORK_NAME_EXT_ID_KEY : 'foo1' },
3090
3108
'networks' : ["10.0.0.1/24" ]})
0 commit comments