moto 4.2.3.dev17__py2.py3-none-any.whl → 4.2.3.dev18__py2.py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- moto/__init__.py +2 -1
- moto/backend_index.py +1 -0
- moto/robomaker/__init__.py +5 -0
- moto/robomaker/models.py +73 -0
- moto/robomaker/responses.py +46 -0
- moto/robomaker/urls.py +16 -0
- {moto-4.2.3.dev17.dist-info → moto-4.2.3.dev18.dist-info}/METADATA +1 -1
- {moto-4.2.3.dev17.dist-info → moto-4.2.3.dev18.dist-info}/RECORD +13 -9
- {moto-4.2.3.dev17.dist-info → moto-4.2.3.dev18.dist-info}/AUTHORS.md +0 -0
- {moto-4.2.3.dev17.dist-info → moto-4.2.3.dev18.dist-info}/LICENSE +0 -0
- {moto-4.2.3.dev17.dist-info → moto-4.2.3.dev18.dist-info}/WHEEL +0 -0
- {moto-4.2.3.dev17.dist-info → moto-4.2.3.dev18.dist-info}/entry_points.txt +0 -0
- {moto-4.2.3.dev17.dist-info → moto-4.2.3.dev18.dist-info}/top_level.txt +0 -0
moto/__init__.py
CHANGED
|
@@ -148,6 +148,7 @@ mock_resourcegroups = lazy_load(
|
|
|
148
148
|
mock_resourcegroupstaggingapi = lazy_load(
|
|
149
149
|
".resourcegroupstaggingapi", "mock_resourcegroupstaggingapi"
|
|
150
150
|
)
|
|
151
|
+
mock_robomaker = lazy_load(".robomaker", "mock_robomaker")
|
|
151
152
|
mock_route53 = lazy_load(".route53", "mock_route53")
|
|
152
153
|
mock_route53resolver = lazy_load(
|
|
153
154
|
".route53resolver", "mock_route53resolver", boto3_name="route53resolver"
|
|
@@ -211,7 +212,7 @@ mock_all = MockAll
|
|
|
211
212
|
# logging.getLogger('boto').setLevel(logging.CRITICAL)
|
|
212
213
|
|
|
213
214
|
__title__ = "moto"
|
|
214
|
-
__version__ = "4.2.3.
|
|
215
|
+
__version__ = "4.2.3.dev18"
|
|
215
216
|
|
|
216
217
|
|
|
217
218
|
try:
|
moto/backend_index.py
CHANGED
|
@@ -136,6 +136,7 @@ backend_url_patterns = [
|
|
|
136
136
|
re.compile("https?://resource-groups(-fips)?\\.(.+)\\.amazonaws.com"),
|
|
137
137
|
),
|
|
138
138
|
("resourcegroupstaggingapi", re.compile("https?://tagging\\.(.+)\\.amazonaws.com")),
|
|
139
|
+
("robomaker", re.compile("https?://robomaker\\.(.+)\\.amazonaws\\.com")),
|
|
139
140
|
("route53", re.compile("https?://route53(\\..+)?\\.amazonaws.com")),
|
|
140
141
|
(
|
|
141
142
|
"route53resolver",
|
moto/robomaker/models.py
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from moto.core import BaseBackend, BackendDict, BaseModel
|
|
2
|
+
from moto.core.utils import unix_time
|
|
3
|
+
|
|
4
|
+
from typing import Any, Dict, List, Iterable
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RobotApplication(BaseModel):
|
|
8
|
+
def __init__(
|
|
9
|
+
self,
|
|
10
|
+
account_id: str,
|
|
11
|
+
region: str,
|
|
12
|
+
name: str,
|
|
13
|
+
sources: List[Dict[str, str]],
|
|
14
|
+
robot_software_suite: Dict[str, str],
|
|
15
|
+
):
|
|
16
|
+
self.account_id = account_id
|
|
17
|
+
self.region = region
|
|
18
|
+
self.name = name
|
|
19
|
+
self.sources = sources
|
|
20
|
+
self.robot_software_suite = robot_software_suite
|
|
21
|
+
self.created_on = unix_time()
|
|
22
|
+
|
|
23
|
+
@property
|
|
24
|
+
def arn(self) -> str:
|
|
25
|
+
return f"arn:aws:robomaker:{self.region}:{self.account_id}:robot-application/{self.name}/{self.created_on}"
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
28
|
+
return {
|
|
29
|
+
"arn": self.arn,
|
|
30
|
+
"name": self.name,
|
|
31
|
+
"sources": self.sources,
|
|
32
|
+
"robotSoftwareSuite": self.robot_software_suite,
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class RoboMakerBackend(BaseBackend):
|
|
37
|
+
def __init__(self, region_name: str, account_id: str):
|
|
38
|
+
super().__init__(region_name, account_id)
|
|
39
|
+
self.robot_applications: Dict[str, RobotApplication] = {}
|
|
40
|
+
|
|
41
|
+
def create_robot_application(
|
|
42
|
+
self,
|
|
43
|
+
name: str,
|
|
44
|
+
sources: List[Dict[str, str]],
|
|
45
|
+
robot_software_suite: Dict[str, str],
|
|
46
|
+
) -> RobotApplication:
|
|
47
|
+
"""
|
|
48
|
+
The tags and environment parameters are not yet implemented
|
|
49
|
+
"""
|
|
50
|
+
app = RobotApplication(
|
|
51
|
+
account_id=self.account_id,
|
|
52
|
+
region=self.region_name,
|
|
53
|
+
name=name,
|
|
54
|
+
sources=sources,
|
|
55
|
+
robot_software_suite=robot_software_suite,
|
|
56
|
+
)
|
|
57
|
+
self.robot_applications[name] = app
|
|
58
|
+
return app
|
|
59
|
+
|
|
60
|
+
def describe_robot_application(self, application: str) -> RobotApplication:
|
|
61
|
+
return self.robot_applications[application]
|
|
62
|
+
|
|
63
|
+
def delete_robot_application(self, application: str) -> None:
|
|
64
|
+
self.robot_applications.pop(application)
|
|
65
|
+
|
|
66
|
+
def list_robot_applications(self) -> Iterable[RobotApplication]:
|
|
67
|
+
"""
|
|
68
|
+
Currently returns all applications - none of the parameters are taken into account
|
|
69
|
+
"""
|
|
70
|
+
return self.robot_applications.values()
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
robomaker_backends = BackendDict(RoboMakerBackend, "robomaker")
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
3
|
+
from moto.core.responses import BaseResponse
|
|
4
|
+
from .models import robomaker_backends, RoboMakerBackend
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RoboMakerResponse(BaseResponse):
|
|
8
|
+
def __init__(self) -> None:
|
|
9
|
+
super().__init__(service_name="robomaker")
|
|
10
|
+
|
|
11
|
+
@property
|
|
12
|
+
def robomaker_backend(self) -> RoboMakerBackend:
|
|
13
|
+
return robomaker_backends[self.current_account][self.region]
|
|
14
|
+
|
|
15
|
+
def create_robot_application(self) -> str:
|
|
16
|
+
name = self._get_param("name")
|
|
17
|
+
sources = self._get_param("sources")
|
|
18
|
+
robot_software_suite = self._get_param("robotSoftwareSuite")
|
|
19
|
+
app = self.robomaker_backend.create_robot_application(
|
|
20
|
+
name=name,
|
|
21
|
+
sources=sources,
|
|
22
|
+
robot_software_suite=robot_software_suite,
|
|
23
|
+
)
|
|
24
|
+
return json.dumps(app.to_dict())
|
|
25
|
+
|
|
26
|
+
def describe_robot_application(self) -> str:
|
|
27
|
+
application = self._get_param("application")
|
|
28
|
+
app = self.robomaker_backend.describe_robot_application(
|
|
29
|
+
application=application,
|
|
30
|
+
)
|
|
31
|
+
return json.dumps(app.to_dict())
|
|
32
|
+
|
|
33
|
+
def delete_robot_application(self) -> str:
|
|
34
|
+
application = self._get_param("application")
|
|
35
|
+
self.robomaker_backend.delete_robot_application(
|
|
36
|
+
application=application,
|
|
37
|
+
)
|
|
38
|
+
return "{}"
|
|
39
|
+
|
|
40
|
+
def list_robot_applications(self) -> str:
|
|
41
|
+
robot_applications = self.robomaker_backend.list_robot_applications()
|
|
42
|
+
return json.dumps(
|
|
43
|
+
dict(
|
|
44
|
+
robotApplicationSummaries=[app.to_dict() for app in robot_applications]
|
|
45
|
+
)
|
|
46
|
+
)
|
moto/robomaker/urls.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
from .responses import RoboMakerResponse
|
|
2
|
+
|
|
3
|
+
url_bases = [
|
|
4
|
+
r"https?://robomaker\.(.+)\.amazonaws\.com",
|
|
5
|
+
]
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
response = RoboMakerResponse()
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
url_paths = {
|
|
12
|
+
"{0}/createRobotApplication$": response.dispatch,
|
|
13
|
+
"{0}/deleteRobotApplication$": response.dispatch,
|
|
14
|
+
"{0}/describeRobotApplication$": response.dispatch,
|
|
15
|
+
"{0}/listRobotApplications$": response.dispatch,
|
|
16
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
moto/__init__.py,sha256=
|
|
2
|
-
moto/backend_index.py,sha256=
|
|
1
|
+
moto/__init__.py,sha256=scWAFJIX7hNkCH6TadubHaTAZM0F64noiLRxYabf1T4,9689
|
|
2
|
+
moto/backend_index.py,sha256=JDpbrcbt5e30v7D8c5IsxbqIDUXTvm4OuClX6V81cJU,10707
|
|
3
3
|
moto/backends.py,sha256=rC9WUMUUWmVmX7ZEfXpVKAQAw6oI8qYobCEPxP2Zv9U,1805
|
|
4
4
|
moto/server.py,sha256=cp8kIe5jVOm7Z2BlNN2AMbTfrRvLBEKSb4mt7O8nu34,2858
|
|
5
5
|
moto/settings.py,sha256=BTqhtAWFmDoy5aG_o248d7KK5Dj3Hiv1wuX54PJu5tc,5243
|
|
@@ -788,6 +788,10 @@ moto/resourcegroupstaggingapi/__init__.py,sha256=lrbLhm-ParAY1uy-A77tZTfUp4116IY
|
|
|
788
788
|
moto/resourcegroupstaggingapi/models.py,sha256=t-jnaupRfXDTXifhHh-W9vziXhR6Yu2qWQ0C6tH6WY0,29866
|
|
789
789
|
moto/resourcegroupstaggingapi/responses.py,sha256=-9_msYeAFuQqmfcHjShWkLpQCtnXxWk8vUJMOpR3zh8,3051
|
|
790
790
|
moto/resourcegroupstaggingapi/urls.py,sha256=NO2uLmbvCRCUjm-IbRnXDC_BR_lzwjxjCylgSedZb3o,178
|
|
791
|
+
moto/robomaker/__init__.py,sha256=DSxUFBQvEVR4jaG2VGUdzqwlOOBGXnrx9mbcGoYYpUE,203
|
|
792
|
+
moto/robomaker/models.py,sha256=0ZX4WIN0PzimhvnsmFvo9hPX3MeWF0fRSXE-v8ulrrs,2292
|
|
793
|
+
moto/robomaker/responses.py,sha256=J9FJE_8DKp9pxdzVancXY3qlm6XUM041Lh3ULB4BIgg,1561
|
|
794
|
+
moto/robomaker/urls.py,sha256=bWI4R347OSGc1HtvRTvzOftRq9BDk38e-6Xot56RkiU,375
|
|
791
795
|
moto/route53/__init__.py,sha256=oS_OqM4XQvRXdrnDF4MHEGmkx6wAU1-ds6b_VBfa4Uc,127
|
|
792
796
|
moto/route53/exceptions.py,sha256=QETbYYhhLgmxvuY-BHDpldm5QX8LTTLCaDzZQKIdpco,5527
|
|
793
797
|
moto/route53/models.py,sha256=LJPfRFUSAjW8oYqsR3QnrEkS70EJ2ib2Z6xfThfSaTU,37145
|
|
@@ -1030,10 +1034,10 @@ moto/xray/mock_client.py,sha256=nYl8JVJbl3OY-tnUafkVOG4K4-cFm5bsft3Hxo7fKwI,3809
|
|
|
1030
1034
|
moto/xray/models.py,sha256=0QL6nmhpVVwAiyi9aw4pBwVTRhqPW9oIy2uwPDhPKug,11179
|
|
1031
1035
|
moto/xray/responses.py,sha256=p2xsg2-P9h_1DCyuBC7GenmC5L64tXAX6a-XCb2j5-o,6316
|
|
1032
1036
|
moto/xray/urls.py,sha256=R6T3gMwobWipukWcC1DQ36CU1Rjt6oqBDoe-7HqaIZU,393
|
|
1033
|
-
moto-4.2.3.
|
|
1034
|
-
moto-4.2.3.
|
|
1035
|
-
moto-4.2.3.
|
|
1036
|
-
moto-4.2.3.
|
|
1037
|
-
moto-4.2.3.
|
|
1038
|
-
moto-4.2.3.
|
|
1039
|
-
moto-4.2.3.
|
|
1037
|
+
moto-4.2.3.dev18.dist-info/AUTHORS.md,sha256=dDUhasV8HGSkzb7zj7a0b3alnqY0P1LPOyOUNoo8Mpo,2976
|
|
1038
|
+
moto-4.2.3.dev18.dist-info/LICENSE,sha256=8S75_TlqE-kIeGMLG0-rRxxu2ct6SM8quyUWKBYyIY4,10834
|
|
1039
|
+
moto-4.2.3.dev18.dist-info/METADATA,sha256=H30Vnw_DeGHUxJhuxo0RsoB6H7vh5AI6pamxLY-kuX0,12102
|
|
1040
|
+
moto-4.2.3.dev18.dist-info/WHEEL,sha256=iYlv5fX357PQyRT2o6tw1bN-YcKFFHKqB_LwHO5wP-g,110
|
|
1041
|
+
moto-4.2.3.dev18.dist-info/entry_points.txt,sha256=aPovbZuFXCwt8_m2vcolpH4Qr3rOF3yXeRElP9Zkauo,49
|
|
1042
|
+
moto-4.2.3.dev18.dist-info/top_level.txt,sha256=TETRKAPcAAvoZDkSkwQiZtTSr-1gzaEAXVm9FmZKj8s,5
|
|
1043
|
+
moto-4.2.3.dev18.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|