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:
parent
e8f1522d1a
commit
4d0ee82f98
14 changed files with 1690 additions and 8 deletions
|
|
@ -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"),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue