예제 #1
0
파일: remote.py 프로젝트: vehrlich/autotest
    def get_platform_label(self):
        """
        Return the platform label, or None if platform label is not set.
        """

        if self.job:
            keyval_path = os.path.join(self.job.resultdir, "host_keyvals", self.hostname)
            keyvals = utils.read_keyval(keyval_path)
            return keyvals.get("platform", None)
        else:
            return None
예제 #2
0
파일: remote.py 프로젝트: vi-patel/autotest
    def get_platform_label(self):
        """
        Return the platform label, or None if platform label is not set.
        """

        if self.job:
            keyval_path = os.path.join(self.job.resultdir, 'host_keyvals',
                                       self.hostname)
            keyvals = utils.read_keyval(keyval_path)
            return keyvals.get('platform', None)
        else:
            return None
예제 #3
0
파일: remote.py 프로젝트: vehrlich/autotest
 def get_all_labels(self):
     """
     Return all labels, or empty list if label is not set.
     """
     if self.job:
         keyval_path = os.path.join(self.job.resultdir, "host_keyvals", self.hostname)
         keyvals = utils.read_keyval(keyval_path)
         all_labels = keyvals.get("labels", "")
         if all_labels:
             all_labels = all_labels.split(",")
             return [urllib.unquote(label) for label in all_labels]
     return []
예제 #4
0
파일: remote.py 프로젝트: vi-patel/autotest
 def get_all_labels(self):
     """
     Return all labels, or empty list if label is not set.
     """
     if self.job:
         keyval_path = os.path.join(self.job.resultdir, 'host_keyvals',
                                    self.hostname)
         keyvals = utils.read_keyval(keyval_path)
         all_labels = keyvals.get('labels', '')
         if all_labels:
             all_labels = all_labels.split(',')
             return [urllib.unquote(label) for label in all_labels]
     return []