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

Side by Side Diff: tools/telemetry/telemetry/core/platform/device.py

Issue 564173002: (Telemetry) Rename Device.device_id to Device.guid (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « tools/telemetry/telemetry/core/platform/cros_device.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 import logging as real_logging 4 import logging as real_logging
5 5
6 6
7 class Device(object): 7 class Device(object):
8 """ A base class of devices. 8 """ A base class of devices.
9 A device instance contains all the necessary information for constructing 9 A device instance contains all the necessary information for constructing
10 a platform backend object for remote platforms. 10 a platform backend object for remote platforms.
11 11
12 Attributes: 12 Attributes:
13 name: A device name string in human-understandable term. 13 name: A device name string in human-understandable term.
14 device_id: A unique id of the device. Subclass of device must specify this 14 guid: A unique id of the device. Subclass of device must specify this
15 id properly so that device objects to a same actual device must have same 15 id properly so that device objects to a same actual device must have same
16 device_id. 16 guid.
17 """ 17 """
18 18
19 def __init__(self, name, device_id): 19 def __init__(self, name, guid):
20 self._name = name 20 self._name = name
21 self._device_id = device_id 21 self._guid = guid
22 22
23 @property 23 @property
24 def name(self): 24 def name(self):
25 return self._name 25 return self._name
26 26
27 @property 27 @property
28 def device_id(self): 28 def guid(self):
29 return self._device_id 29 return self._guid
30 30
31 @classmethod 31 @classmethod
32 def GetAllConnectedDevices(cls, logging=real_logging): 32 def GetAllConnectedDevices(cls, logging=real_logging):
33 raise NotImplementedError() 33 raise NotImplementedError()
OLDNEW
« no previous file with comments | « tools/telemetry/telemetry/core/platform/cros_device.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698