support - intial commit to kick off trusted advisor checks (#3685)

* support - intial commit to kick off trusted advisor checks

* edit - expanded testing to include checking for expected check ids and
check names.

Added server testing

added support resource json to manifest file and simplified
support response return from reviewed comments

* Streamline loading of resource files

* edit - ensured regions are assigned in models

Co-authored-by: Bert Blommers <info@bertblommers.nl>
This commit is contained in:
Connor 2021-02-14 12:22:16 +00:00 committed by GitHub
commit 4d0ee82f98
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 1690 additions and 8 deletions

View file

@ -34,6 +34,7 @@ from moto.core.utils import (
)
from moto.core import ACCOUNT_ID
from moto.kms import kms_backends
from moto.utilities.utils import load_resource
from os import listdir
from .exceptions import (
@ -169,12 +170,7 @@ from .utils import (
)
def _load_resource(filename):
with open(filename, "r") as f:
return json.load(f)
INSTANCE_TYPES = _load_resource(
INSTANCE_TYPES = load_resource(
resource_filename(__name__, "resources/instance_types.json")
)
@ -190,10 +186,10 @@ for location_type in listdir(resource_filename(__name__, offerings_path)):
)
INSTANCE_TYPE_OFFERINGS[location_type][
region.replace(".json", "")
] = _load_resource(full_path)
] = load_resource(full_path)
AMIS = _load_resource(
AMIS = load_resource(
os.environ.get("MOTO_AMIS_PATH")
or resource_filename(__name__, "resources/amis.json"),
)