Implementation of core AWS Media Live endpoins (#3428)

* Initial attempt to mock AWS Media Live create_channel endpoint. Test fails.

* Completes basic implementation of Media Live create_channel endpoint

* Completes basic implementation of Media Live list_channels endpoint

* Adds skaffolds for describe_channel and delete_channel

* Adds unit test for delete_channel

* Adds unit test for describe_channel

* Reduces repetitive code by introducing a Channel model

* Implements MediaLive start_channel and stop_channel endpoints

* Fixes lack of support for the dash character in resource ARNs

* Implements MediaLive update_channel endpoint.

* Implements MediaLive create_input endpoint (and Input model).

* Implements MediaLive describe_input endpoint.

* Implements MediaLive list_inputs endpoint.

* Implements MediaLive update_input endpoint.

* Addse server tests for MediaLive

* Adds further url patterns for medialive

* Fixes url patterns

* Fixes url patterns
This commit is contained in:
Jordan Dimov 2021-01-19 16:11:39 +00:00 committed by GitHub
commit f11e3183bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 877 additions and 14 deletions

View file

@ -324,7 +324,12 @@ class BaseResponse(_TemplateEnvironmentMixin, ActionAuthenticatorMixin):
def _convert(elem, is_last):
if not re.match("^{.*}$", elem):
return elem
name = elem.replace("{", "").replace("}", "").replace("+", "")
name = (
elem.replace("{", "")
.replace("}", "")
.replace("+", "")
.replace("-", "_")
)
if is_last:
return "(?P<%s>[^/]*)" % name
return "(?P<%s>.*)" % name