Method: IntegrationHelper#getService

Defined in:
lib/cloudmunch_Ruby_sdk_v2/IntegrationHelper.rb,
lib/cloudmunch_Ruby_sdk_v3/IntegrationHelper.rb

#getService(jsonParams) ⇒ Object



25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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