Sends sequential number to Vodafone as link test

This commit is contained in:
Pea Tyczynska
2020-12-04 15:49:50 +00:00
parent e6824dc3ff
commit b34bffaae6
4 changed files with 52 additions and 8 deletions

View File

@@ -42,6 +42,7 @@ class CBCProxyClient:
proxy_classes = {
'canary': CBCProxyCanary,
BroadcastProvider.EE: CBCProxyEE,
BroadcastProvider.VODAFONE: CBCProxyVodafone,
}
return proxy_classes[provider](self._lambda_client)
@@ -61,6 +62,7 @@ class CBCProxyClientBase:
def send_link_test(
self,
identifier,
sequential_number=None
):
pass
@@ -131,6 +133,7 @@ class CBCProxyEE(CBCProxyClientBase):
def send_link_test(
self,
identifier,
sequential_number=None
):
"""
link test - open up a connection to a specific provider, and send them an xml payload with a <msgType> of
@@ -155,3 +158,20 @@ class CBCProxyEE(CBCProxyClientBase):
'expires': expires,
}
self._invoke_lambda(payload=payload)
class CBCProxyVodafone(CBCProxyClientBase):
lambda_name = 'bt-ee-1-proxy'
def send_link_test(
self,
identifier,
sequential_number
):
"""
link test - open up a connection to a specific provider, and send them an xml payload with a <msgType> of
test.
"""
payload = {'message_type': 'test', 'identifier': identifier, 'message_number': sequential_number}
self._invoke_lambda(payload=payload)