Changes between Initial Version and Version 1 of GEC17Agenda/GettingStartedWithGENI_III_GIMI/Procedure/TrackIssues/ExpServiceNew


Ignore:
Timestamp:
07/18/13 14:41:05 (11 years ago)
Author:
divyashri.bhat@gmail.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEC17Agenda/GettingStartedWithGENI_III_GIMI/Procedure/TrackIssues/ExpServiceNew

    v1 v1  
     1When I do a POST to the experiment service, I can see that the user has been added to a project[[BR]]
     2But When I do
     3{{{
     4 curl http://emmy9.casa.umass.edu:8002/users/geni-dbhat/
     5}}}
     6It does not list the project that I just added it to.
     7
     8If I do
     9{{{
     10curl http://emmy9.casa.umass.edu:8002/projects/GIMITesting/users/
     11}}}
     12I can see geni-dbhat in the list
     13
     14Here is the code in which I am creating the JSON:
     15
     16{{{
     17 def postUser(self):
     18        data = [{'name': "geni-" + self.user_name}]
     19        headers = {'Content-type': 'application/json', 'Accept': 'text/plain'}
     20        #data=json.dumps(data)
     21        json_filename = self.workdirectory + "/user.json"
     22        print ("Saving JSON to file: " + json_filename)
     23        jsonf = open(json_filename,'w')
     24        data = json.dumps(data)
     25        jsonf.write(data)
     26        jsonf.close()
     27        os.system('curl -X POST -H "Content-Type: application/json" --data-binary @'+ json_filename +' ' + self.restURL + ':' + str(self.restPort) + '/projects/' + self.proj_name + '/users')
     28
     29}}}
     30
     31The contents of my json file are:
     32
     33{{{
     34[{"name": "geni-dbhat"}]
     35}}}