We need to collect some information from onprem service which the Morpheus App node has access. Hence, workflow/ task is the only option to get that info in Morpheus UI. Now, this info I want to put it under a instance tab.
To do this I need to execute a workflow using REST Api. So, any suggestions on how can this be achieved from Plugin code.
I see a function name getRpcConfig. def rpcConfig = getRpcConfig(poolServer)
Can I know what other ways can I get this rpcConfig. I am referring to https://developer.morpheusdata.com/api/index.html
Yes, the cypher service is accessible from within plugins. The following is a snippet from an older version of the DataDog plugin code that referenced cypher for credentials.
// Define the Morpheus account/tenant in which
// to search for the DataDog credentials. The plugin
// assumes the master account shoud be searched.
def account = new Account(id: 1)
def cypherAccess = new CypherAccess(account)
// Retrieve the DataDog API key from Cypher
// The plugin expects the name of the secret to be dd-api-key
def intApiKey = morpheus.getCypher().read(cypherAccess, "secret/dd-api-key")
def apiKey = ""
intApiKey.subscribe(
{ secretData ->
apiKey = secretData
},
{ error ->
println error.printStackTrace()
}
)