The FGCP Relay Server can be used when your current script environment does not support connections with client certificates, like e.g. on Google App Engine.
In order to use this Relay Server, you will need to have a relay script running on some other server, so that it can establish the client certificate connection for you. A basic example is provided in the tests/cgi-bin/ directory.
Then you can simply specify that you want to connect to the region 'relay=https://...' in your scripts, instead of using a real region 'uk', 'de' etc.
Example: [see tests/test_*.py for more examples]
# Connect without valid client certificate to region 'relay=http://...'
from fgcp.resource import FGCPVDataCenter
relay = 'http://127.0.0.1:8000/cgi-bin/fgcp_relay.py'
vdc = FGCPVDataCenter('client.pem', 'relay=%s' % relay)
# Set your private key for the signature here (PEM string)
vdc.getproxy().set_key(private_key)
# Do typical actions on resources
vsystem = vdc.get_vsystem('Demo System')
vsystem.show_status()
#for vserver in vsystem.vservers:
# result = vserver.backup(wait=True)
#...
# See tests/test_resource.py for more examples
Note: this client API library also provides a Test Server for local library tests, without needing access or registration to the Fujitsu Global Cloud Platform.
Content: index ClientMethods.html ResourceActions.html APICommands.html ClassDiagrams.html TestServer.html RelayServer.html pydoc fgcp pydoc tests