services/chef-services/cookbooks/cloudify/libraries/cloudify.rb
#returns a resource url to be used in a REST request
returns a resource url to be used in a REST request
returns a resource url to be used in a REST request
def cloudify_resource_uri(scope, application, service, instance_id)
        case scope
            when :global      then "/attributes/globals"
            when :application then "/attributes/applications/#{application}"
            when :service     then "/attributes/services/#{application}/#{service}"
            when :instance    then "/attributes/instances/#{application}/#{service}/#{instance_id}"
            else raise ArgumentError.new """Invalid attribute type '#{scope}'.
                                            Use one of: global/application/service/instance"""
        end
    end
def cloudify_resource_uri ( scope , application , service , instance_id ) case scope when :global then "/attributes/globals" when :application then "/attributes/applications/#{application}" when :service then "/attributes/services/#{application}/#{service}" when :instance then "/attributes/instances/#{application}/#{service}/#{instance_id}" else raise ArgumentError . new "" "Invalid attribute type '#{scope}'.
                                            Use one of: global/application/service/instance" "" end end
returns a resource url to be used in a REST request
returns a resource url to be used in a REST request
scope
application
service
instance_id