X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fdummy%2Fdummy_testbed_api_client.py;h=38ba0d3b4de18ee903fcc03e5bb6d1d8eb80f623;hb=acd13fb68264ecdc1996954f3f464537806f7380;hp=e32c15b94ac4814c0cb0cb8fd86114b17def6b76;hpb=6717f88d0c48628d749af8c73939f1ddfcfba5b9;p=sfa.git diff --git a/sfa/dummy/dummy_testbed_api_client.py b/sfa/dummy/dummy_testbed_api_client.py index e32c15b9..38ba0d3b 100644 --- a/sfa/dummy/dummy_testbed_api_client.py +++ b/sfa/dummy/dummy_testbed_api_client.py @@ -5,11 +5,12 @@ import time dummy_url = "http://localhost:8080" dummy_api = xmlrpclib.ServerProxy(dummy_url) -# Edit the parameters with your user info: +# Add a user: my_user_id = dummy_api.AddUser({'email': 'john.doe@test.net', 'user_name': 'john.doe', 'keys': ['copy here your ssh-rsa public key']}) -# Your user will be attached with the slice named : slice2 : +# Attach the user with the slice named : slice2 : dummy_api.AddUserToSlice({'slice_id': 2, 'user_id': my_user_id}) - -print dummy_api.GetUsers()[-1] -print dummy_api.GetSlices()[-1] +# Display the list of users +print dummy_api.GetUsers() +# Display the list of slices +print dummy_api.GetSlices()