Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions apim-apk-agent/pkg/managementserver/rest_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func StartInternalServer(port uint) {
}
apiYaml, definition, endpointsYaml := createAPIYaml(&event)
deploymentContent := createDeployementYaml(event.API.Vhost)
logger.LoggerMgtServer.Infof("Created apiYaml : %s, \n\n\n created definition file: %s, \n\n\n created endpointYaml : %s", apiYaml, definition, endpointsYaml)
logger.LoggerMgtServer.Debugf("Created apiYaml : %s, \n\n\n created definition file: %s, \n\n\n created endpointYaml : %s", apiYaml, definition, endpointsYaml)
definitionPath := fmt.Sprintf("%s-%s/Definitions/swagger.yaml", event.API.APIName, event.API.APIVersion)
if strings.ToUpper(event.API.APIType) == "GRAPHQL" {
definitionPath = fmt.Sprintf("%s-%s/Definitions/schema.graphql", event.API.APIName, event.API.APIVersion)
Expand Down Expand Up @@ -642,7 +642,7 @@ func createAPIYaml(apiCPEvent *APICPEvent) (string, string, string) {
var requestOperationPolicies []OperationPolicy
if apiCPEvent.API.AIModelBasedRoundRobin != nil {
aiModelBasedRoundRobin := apiCPEvent.API.AIModelBasedRoundRobin
logger.LoggerMgtServer.Infof("AIModelBasedRoundRobin : %+v", aiModelBasedRoundRobin)
logger.LoggerMgtServer.Debugf("AIModelBasedRoundRobin : %+v", aiModelBasedRoundRobin)
wrr := ModelBasedRoundRobinConfig{
Production: convertAIModelWeightsToModelConfigs(aiModelBasedRoundRobin.ProductionModels, apimEndpints, true),
Sandbox: convertAIModelWeightsToModelConfigs(aiModelBasedRoundRobin.SandboxModels, apimEndpints, false),
Expand All @@ -668,9 +668,9 @@ func createAPIYaml(apiCPEvent *APICPEvent) (string, string, string) {
Request: requestOperationPolicies,
}

logger.LoggerMgtServer.Infof("API Yaml: %+v", data)
logger.LoggerMgtServer.Debugf("API Yaml: %+v", data)
yamlBytes, _ := yaml.Marshal(data)
logger.LoggerMgtServer.Infof("Endpoint Yaml: %v", endpointsData)
logger.LoggerMgtServer.Debugf("Endpoint Yaml: %v", endpointsData)
endpointBytes, _ := yaml.Marshal(endpointsData)
return string(yamlBytes), definition, string(endpointBytes)
}
Expand Down
Loading