Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1130)

Unified Diff: remoting/tools/register_host.py

Issue 3048036: Updated register_host.py for the latest version of the directory service. (Closed)
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/tools/register_host.py
diff --git a/remoting/tools/register_host.py b/remoting/tools/register_host.py
index 166a54a0176afee2582209d337187852987acea4..022fdf1cac51c6be80d963db3426cac936c0a5c7 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)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698