I am new to Cloud Foundry. I want to automate the application deployment and service binding in Cloud Foundry with Python.
For deploying an application in Cloud Foundry we will use the commands (Cloud Foundry CLI) like:
cf push redis-sample-app
cf create-service redis shared-vm service-example-redis
cf bind-service redis-sample-app service-example-redis
cf restage redis-sample-app
Now I don't want to use the CLI for that, I just want to write a Python/Ruby/(any language) script which will do all the things.
I have tried google and ended up with Python cloudfoundry
module, but it's not clear to go on. Is there any API for my task, like boto
for accessing EC2. I have tried following code in Python:
from cloudfoundrty import CloudFoundryInterface
cf=CloudFoundryInterface(target="api.end.point",username="myusername",password="mypwd")
cf.login()
It's showing the error:
`File "C:\Python27\lib\site-packages\requests\models.py", line 398, in full_url
raise MissingSchema("Invalid URL %r: No schema supplied" % url)
MissingSchema: Invalid URL u'users/kishorekumarnetala%40gmail.com/tokens': No schema supplied`