Hello,
I am new to Cloud Foundry and ruby. And now I have been trapped in the part
of service gateway when studying the source code of cloud controller and
vcap-service-base.
As we all know, when client wants to provision a service, vmc sends a
command to cloud controller, and cloud controller finds corresponding
service by label and provider in the local postgres DB.

Here are some codes:
svc = Service.find_by_label_and_provider(req.label, req.provider == "core"
? nil : req.provider)

*But I cannot find the defining function of find_by_label_and_provider. *
I guess it must have something to do with Postgres, but I don't know how it
works.

Search Discussions

  • Ben Langfeld at Oct 23, 2012 at 3:59 pm
    This is built in to ActiveRecord.
    On 23 October 2012 07:43, Hongliang Sun wrote:

    Hello,
    I am new to Cloud Foundry and ruby. And now I have been trapped in the
    part of service gateway when studying the source code of cloud controller
    and vcap-service-base.
    As we all know, when client wants to provision a service, vmc sends a
    command to cloud controller, and cloud controller finds corresponding
    service by label and provider in the local postgres DB.

    Here are some codes:
    svc = Service.find_by_label_and_provider(req.label, req.provider == "core"
    ? nil : req.provider)

    *But I cannot find the defining function of find_by_label_and_provider. *
    I guess it must have something to do with Postgres, but I don't know how
    it works.


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupvcap-dev @
postedOct 23, '12 at 2:44p
activeOct 23, '12 at 3:59p
posts2
users2

2 users in discussion

Hongliang Sun: 1 post Ben Langfeld: 1 post

People

Translate

site design / logo © 2021 Grokbase