Code Monkey home page Code Monkey logo

cloudflare-pivotal-cloud-foundry's Introduction

CloudFlare-Pivotal-Cloud-Foundry

Build Status

Usage

Be sure you have $GOPATH setup.

Set environment variables

export SECURITY_USER_NAME=username
export SECURITY_USER_PASSWORD=password
export PORT=3000

go run main.go runs the service on localhost. go test ./... runs tests.

Documentation

Example cURL calls

In the example the following attributes are replaced with the corresponding value.

  • username is username
  • password is password
  • broker-url is localhost
  • port is 9000
  • instance_id is 1.

Service

curl -H "X-Broker-API-Version: 2.10" http://username:password@localhost:9000/v2/catalog

Provision

curl http://username:password@localhost:9000/v2/service_instances/1 -d '{
  "organization_guid": "org-guid-here",
  "plan_id":           "plan-guid-here",
  "service_id":        "service-guid-here",
  "space_guid":        "space-guid-here",
  "parameters":        {
    "x-auth-key": "mykey",
    "x-auth-email": "[email protected]"
  }
}' -X PUT -H "X-Broker-API-Version: 2.10" -H "Content-Type: application/json"

Deprovision

curl 'http://username:password@localhost:9000/v2/service_instances/1?service_id=service-id-here&plan_id=plan-id-here' -X DELETE -H "X-Broker-API-Version: 2.10"

Bind

  • Assumed binding_id as 2
curl http://username:password@localhost:9000/v2/service_instances/1/service_bindings/2 -d '{
  "plan_id":      "plan-guid-here",
  "service_id":   "service-guid-here",
  "app_guid":     "app-guid-here",
  "bind_resource":     {
    "app_guid": "app-guid-here"
  },
  "parameters":        {
    "domain": "domain.com"
  }
}' -X PUT

Unbind

  • Assumed binding_id as 2
curl 'http://username:password@localhost:9000/v2/service_instances/1/service_bindings/2?service_id=service-id-here&plan_id=plan-id-here' -X DELETE -H "X-Broker-API-Version: 2.10"

Last Operation (Not supported)

curl http://username:password@localhost:9000/v2/service_instances/1/last_operation

Update (Not supported)

curl http://username:password@localhost:9000/v2/service_instances/1 -d '{
  "service_id": "service-guid-here",
  "plan_id": "plan-guid-here",
  "parameters":        {
    "parameter1": 1,
    "parameter2": "value"
  },
  "previous_values": {
    "plan_id": "old-plan-guid-here",
    "service_id": "service-guid-here",
    "organization_id": "org-guid-here",
    "space_id": "space-guid-here"
  }
}' -X PATCH -H "X-Broker-API-Version: 2.10" -H "Content-Type: application/json"

cloudflare-pivotal-cloud-foundry's People

Contributors

jwineman avatar thellimist avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.