@@ -106,13 +106,15 @@ def test_event_error_on_bad_request(sut: SystemUnderTest):
106106
107107def pre_ssdp (sut : SystemUnderTest ):
108108 """Perform prerequisite SSDP steps"""
109- # discover using the redfish search target
110- services = utils .discover_ssdp (search_target = SSDP_REDFISH )
111- sut .add_ssdp_services (SSDP_REDFISH , services )
109+ # try to discover with both IPv4 and IPv6
110+ for protocol in ['ipv4' , 'ipv6' ]:
111+ # discover using the redfish search target
112+ services = utils .discover_ssdp (search_target = SSDP_REDFISH , protocol = protocol )
113+ sut .add_ssdp_services (SSDP_REDFISH , services )
112114
113- # discover using the ssdp:all search target
114- services = utils .discover_ssdp (search_target = SSDP_ALL )
115- sut .add_ssdp_services (SSDP_ALL , services )
115+ # discover using the ssdp:all search target
116+ services = utils .discover_ssdp (search_target = SSDP_ALL , protocol = protocol )
117+ sut .add_ssdp_services (SSDP_ALL , services )
116118
117119 # determine SSDP enabled/disabled state
118120 if sut .mgr_net_proto_uri :
@@ -317,20 +319,26 @@ def test_ssdp_st_header_format(sut: SystemUnderTest):
317319 Assertion .SERV_SSDP_ST_HEADER_FORMAT , msg )
318320 return
319321
320- st_minor = 0
321- msg_minor = 'missing'
322322 if m .group (1 ):
323323 st_minor = int (m .group (1 ).lstrip (':' ))
324324 msg_minor = str (st_minor )
325- # if the service minor ver is non-zero, must be included in the ST header
326- if sut .version_tuple .minor != 0 and sut .version_tuple .minor != st_minor :
327- # FAIL minor version incorrectly specified in ST header
328- msg = ('The Redfish protocol minor version from the Service Root is '
329- '%s, but the minor version in the ST header is %s'
330- % (sut .version_tuple .minor , msg_minor ))
331- sut .log (Result .FAIL , '' , '' , st_header ,
332- Assertion .SERV_SSDP_ST_HEADER_FORMAT , msg )
333- return
325+ # only test the minor version if provided in the header
326+ # returning the minor version is not required
327+ if sut .version_tuple .minor != st_minor :
328+ # FAIL minor version incorrectly specified in ST header
329+ msg = ('The Redfish protocol minor version from the service root is '
330+ '%s, but the minor version in the ST header is %s'
331+ % (sut .version_tuple .minor , msg_minor ))
332+ sut .log (Result .FAIL , '' , '' , st_header ,
333+ Assertion .SERV_SSDP_ST_HEADER_FORMAT , msg )
334+ return
335+ if sut .version_tuple .minor == 0 :
336+ # FAIL minor version is not allowed if its 0
337+ msg = ('The Redfish protocol minor version from the service root is '
338+ '0, but the ST header contained a minor version' )
339+ sut .log (Result .FAIL , '' , '' , st_header ,
340+ Assertion .SERV_SSDP_ST_HEADER_FORMAT , msg )
341+ return
334342
335343 # PASS if we have not already logged a result and returned
336344 sut .log (Result .PASS , '' , '' , st_header ,
0 commit comments