diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 23:41:06 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-07-28 23:41:06 +0000 |
commit | 8654ddd0cbb84fc6ac2b40f8ba4aec0e6566248a (patch) | |
tree | 0da5dee3cc30075ef6e4f045826b3ee7fd2902d1 | |
parent | 6d492e01b802a433071e747711b1add46b0be500 (diff) | |
download | chromium_src-8654ddd0cbb84fc6ac2b40f8ba4aec0e6566248a.zip chromium_src-8654ddd0cbb84fc6ac2b40f8ba4aec0e6566248a.tar.gz chromium_src-8654ddd0cbb84fc6ac2b40f8ba4aec0e6566248a.tar.bz2 |
Updated register_host.py for the latest version of the directory service.
TEST=register_host.py registers host successfully
BUG=None
Review URL: http://codereview.chromium.org/3048036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54070 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-x | remoting/tools/register_host.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/remoting/tools/register_host.py b/remoting/tools/register_host.py index 166a54a..022fdf1 100755 --- a/remoting/tools/register_host.py +++ b/remoting/tools/register_host.py @@ -28,7 +28,7 @@ print "Email:", email = raw_input() password = getpass.getpass("Password: ") -xapi_auth = gaia_auth.GaiaAuthenticator('xapi') +xapi_auth = gaia_auth.GaiaAuthenticator('chromoting') xapi_token = xapi_auth.authenticate(email, password) host_id = str(uuid.uuid1()) @@ -41,11 +41,11 @@ print "Generating RSA key pair...", print "Done" params = ('{"data":{' + \ - '"host_id": "%(host_id)s",' + \ - '"host_name": "%(host_name)s",' + \ - '"public_key": "%(public_key)s"}}') % \ - {'host_id': host_id, 'host_name': host_name, - 'public_key': public_key} + '"hostId": "%(hostId)s",' + \ + '"hostName": "%(hostName)s",' + \ + '"publicKey": "%(publicKey)s"}}') % \ + {'hostId': host_id, 'hostName': host_name, + 'publicKey': public_key} headers = {"Authorization": "GoogleLogin auth=" + xapi_token, "Content-Type": "application/json" } request = urllib2.Request(url, params, headers) |