Notifications

91 views

Description

1.Login into the application as admin user.
2.Run openshift kubernetes discovery.
3.Check OpenShift Kubernetes discovery works fine.

Actual:
OpenShift Kubernetes discovery fails with JAVASCRIPT_CODE_FAILURE due to getcredentials function not having enough arguments.
Make YAML Extension last one to execute.

Expected:
OpenShift Kubernetes discovery works fine.
except YAML extension all extensions should be participate in discovery along with main pattern.

Release or Environment

app-itom-patterns-1.0.65-app.zip

Cause

The following function at line 13 in the script include KubernetesCommandMetadata expecting following arguments.

getCredentials: function(managementIp, credId, tag,contentType) 

But in the OpenShift Get Call Custom operation having only 3 arguments.

getCredentials(host, null, credsAlias);

This is causing Java script Error in custom operation


Resolution

  1. Login into the application as admin user.
  2. Go to Pattern Designer --> Custom Operations.
  3. Open OpenShift Get Call Custom operation.
  4. Replace line number 41 with following workaround code snippet.

Line Number 41:

var creds = scriptInit.getCredentials(host, null, credsAlias);

workaround code snippet :

var contentType = "accept:application/json";
var creds = scriptInit.getCredentials(host, null, credsAlias,contentType);


Article Information

Last Updated:2020-07-24 07:07:53
Published:2020-07-24