cloudfoundry-attic / blockhead

CF-Extensions Blockhead project
Apache License 2.0
3 stars 3 forks source link

Create service catalog endpoint #5

Closed nimakaviani closed 6 years ago

nimakaviani commented 6 years ago

when the broker receives PUT /v2/catalog, must return a response matching the specification HERE

nimakaviani commented 6 years ago

Let's make the catalog configurable similar to how we did it for the initial release. Below is a yaml example of the catalog spec from the earlier version of the broker. We can make the config part of the json configuration we already pass to the broker:

---
- type: replace
  path: /instance_groups/name=docker/jobs/name=cf-containers-broker/properties/services/-
  value:
    name: 'eth'
    id: '24736f4a-72b8-4298-96f7-b48c4045ddfd'
    description: 'Ethereum Geth Node'
    bindable: true
    tags:
      - 'eth'
      - 'geth'
    metadata:
      displayName: 'Geth 1.8'
      longDescription: 'Geth Node'
      providerDisplayName: 'Cloud Foundry Community'
    dashboard_client:
      id: docker-broker-eth
      secret: ((docker-broker-eth-secret))
    plans:
    - id: 'd42fc3cc-1341-4aa3-866e-01bc5243dc2e'
      name: 'free'
      container:
        backend: 'docker'
        image: 'nimak/eth-dev'
      description: 'Free Trial'
      metadata:
        costs:
          - amount:
              usd: 0.0
            unit: 'MONTHLY'
        bullets:
          - 'Dedicated Geth Node'