class IntegrationHelper

Public Class Methods

new() click to toggle source
# File lib/cloudmunch_Ruby_sdk_v2/IntegrationHelper.rb, line 22
def initialize()
end

Public Instance Methods

getIntegration(jsonParams, integrationHash) click to toggle source
# File lib/cloudmunch_Ruby_sdk_v2/IntegrationHelper.rb, line 47
def getIntegration(jsonParams, integrationHash)
    providerName = jsonParams["providername"]
    log("DEBUG", "Provider Name: " + providerName)
    integrationDetailsHash = nil

    if !providerName.nil? && providerName.chop.length > 0 then
        regFields = integrationHash[providerName]["configuration"]

        integrationDetailsHash = {}
        regFields.each do |k,v|
            integrationDetailsHash[k] = v
        end

        return integrationDetailsHash
    else
        return nil
    end
end
getService(jsonParams) click to toggle source
# File lib/cloudmunch_Ruby_sdk_v2/IntegrationHelper.rb, line 25
def getService(jsonParams)
    cloudproviders = jsonParams["cloudproviders"]
    cloudproviders = JSON.parse(cloudproviders)
    providerName = jsonParams["providername"]
    log("DEBUG", "Provider Name: " + providerName)
    integrationDetailsHash = nil

    if !providerName.nil? && providerName.chop.length > 0 then
        regFields = cloudproviders[providerName]

        integrationDetailsHash = {}
        regFields.each do |k,v|
            integrationDetailsHash[k] = v
        end

        return integrationDetailsHash
    else
        return nil
    end
end