@@ -607,34 +607,17 @@ def createconfig(declaration: ConfigDeclaration, apiversion: str, runfromautosyn
607607
608608 status , apiGatewayConfigDeclaration , openAPISchemaJSON = v5_4 .APIGateway .createAPIGateway (locationDeclaration = loc , authProfiles = loc ['apigateway' ]['openapi_schema' ]['authentication' ])
609609
610- if status != 200 :
611- return {"status_code" : 412 ,
612- "message" : {"status_code" : status , "message" :
613- {"code" : status ,
614- "content" : f"OpenAPI schema fetch failed for { loc ['apigateway' ]['openapi_schema' ]['content' ]} " }}}
615-
616610 # API Gateway configuration template rendering
617611 if apiGatewayConfigDeclaration :
618- # API Gateway server / locations file
619612 apiGatewaySnippet = j2_env .get_template (NcgConfig .config ['templates' ]['apigwconf' ]).render (
620- declaration = apiGatewayConfigDeclaration , server = server [ 'names' ][ 0 ], enabledVisibility = apiGwVisibilityIntegrations , ncgconfig = NcgConfig .config )
613+ declaration = apiGatewayConfigDeclaration , enabledVisibility = apiGwVisibilityIntegrations , ncgconfig = NcgConfig .config )
621614 apiGatewaySnippetb64 = base64 .b64encode (bytes (apiGatewaySnippet , 'utf-8' )).decode ('utf-8' )
622615
623616 newAuxFile = {'contents' : apiGatewaySnippetb64 , 'name' : NcgConfig .config ['nms' ]['apigw_dir' ] +
624617 '/' + server ['names' ][0 ] +
625618 loc ['uri' ] + ".conf" }
626619 auxFiles ['files' ].append (newAuxFile )
627620
628- # API Gateway maps file for parameters enforcement
629- apiGatewayMapsSnippet = j2_env .get_template (NcgConfig .config ['templates' ]['apigwmapsconf' ]).render (
630- declaration = apiGatewayConfigDeclaration , server = server ['names' ][0 ], ncgconfig = NcgConfig .config )
631- apiGatewayMapsSnippetb64 = base64 .b64encode (bytes (apiGatewayMapsSnippet , 'utf-8' )).decode ('utf-8' )
632-
633- newAuxFile = {'contents' : apiGatewayMapsSnippetb64 , 'name' : NcgConfig .config ['nms' ]['apigw_maps_dir' ] +
634- '/' + server ['names' ][0 ] +
635- loc ['uri' ].replace ('/' , '_' ) + ".conf" }
636- auxFiles ['files' ].append (newAuxFile )
637-
638621 # API Gateway Developer portal provisioning
639622 if loc ['apigateway' ] and loc ['apigateway' ]['developer_portal' ] and 'enabled' in loc ['apigateway' ]['developer_portal' ] and loc ['apigateway' ]['developer_portal' ]['enabled' ] == True :
640623
@@ -912,4 +895,4 @@ def get_declaration(configUid: str):
912895 if cfg is None :
913896 return 404 , ""
914897
915- return 200 , pickle .loads (cfg ).dict ()
898+ return 200 , pickle .loads (cfg ).dict ()
0 commit comments