dwatrous / cf-service-broker-python Goto Github PK
View Code? Open in Web Editor NEWA CloudFoundry/Stackato/Helion service broker v2 implementation in Python using bottle
License: MIT License
A CloudFoundry/Stackato/Helion service broker v2 implementation in Python using bottle
License: MIT License
This code in catalog() no longer works now that the service broker API is at 2.10 because float("2.10") evaluates to 2.1 which is < 2.3.
if not api_version or float(api_version) < X_BROKER_API_VERSION:
bottle.abort(409, "Missing or incompatible %s. Expecting version %0.1f or later" % (X_BROKER_API_VERSION_NAME, X_BROKER_API_VERSION))
Hi!
I deploy the cf-echo-service and cf-service-broker-python follow the website http://software.danielwatrous.com/managed-services-in-cloudfoundry/,
But at the step "Manage Services" , it failed.
Creating service instance test-echo-service in org DevBox / space test0 as admin...
FAILED
Server error, status code: 502, error code: 10001, message: The service broker returned an invalid response for the request to http://service-broker.172.19.1.145.xip.io/v2/service_instances/a41228b3-52bf-49bc-a5cc-6bfc0a8fc6db?accepts_incomplete=true. Status Code: 500 Internal Server Error, Body:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>Error: 500 Internal Server Error</title>
<style type="text/css">
html {background-color: #eee; font-family: sans;}
body {background-color: #fff; border: 1px solid #ddd;
padding: 15px; margin: 15px;}
pre {background-color: #eee; border: 1px solid #ddd; padding: 5px;}
</style>
</head>
<body>
<h1>Error: 500 Internal Server Error</h1>
<p>Sorry, the requested URL <tt>'http://service-broker.172.19.1.145.xip.io/v2/service_instances/a41228b3-52bf-49bc-a5cc-6bfc0a8fc6db?accepts_incomplete=true'</tt>
caused an error:</p>
<pre>Internal Server Error</pre>
<h2>Exception:</h2>
<pre>ConnectionError(ProtocolError('Connection aborted.', error(111, 'Connection refused')),)</pre>
<h2>Traceback:</h2>
<pre>Traceback (most recent call last):
File "/app/.heroku/python/lib/python2.7/site-packages/bottle.py", line 862, in _handle
return route.call(**args)
File "/app/.heroku/python/lib/python2.7/site-packages/bottle.py", line 1732, in wrapper
rv = callback(*a, **ka)
File "/app/.heroku/python/lib/python2.7/site-packages/bottle.py", line 2680, in wrapper
return func(*a, **ka)
File "service-broker.py", line 101, in provision
provision_result = requests.put(bottle.template(service_instance, instance_id=instance_id))
File "/app/.heroku/python/lib/python2.7/site-packages/requests/api.py", line 122, in put
return request('put', url, data=data, **kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/requests/api.py", line 50, in request
response = session.request(method=method, url=url, **kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/requests/sessions.py", line 465, in request
resp = self.send(prep, **send_kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/requests/sessions.py", line 573, in send
r = adapter.send(request, **kwargs)
File "/app/.heroku/python/lib/python2.7/site-packages/requests/adapters.py", line 415, in send
raise ConnectionError(err, request=request)
ConnectionError: ('Connection aborted.', error(111, 'Connection refused'))
</pre>
</body>
</html>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.