Lines Matching refs:device_hostname

50     def get_rpm_hostname(cls, device_hostname):  argument
62 def get_rpm_outlet(cls, device_hostname): argument
74 def get_hydra_hostname(cls, device_hostname): argument
86 def is_device_in_the_lab(cls, device_hostname): argument
95 return device_hostname.lab == cls.LAB_NUMBER
105 def get_rpm_hostname(cls, device_hostname): argument
113 if not device_hostname.row:
116 device_hostname.lab, device_hostname.row,
117 device_hostname.rack)
121 def get_rpm_outlet(cls, device_hostname): argument
129 if not device_hostname.row:
131 return '.A%d' % device_hostname.host
154 def get_rpm_hostname(cls, device_hostname): argument
163 device_hostname.lab, device_hostname.row,
164 device_hostname.rack)
168 def get_rpm_outlet(cls, device_hostname): argument
176 return '.A%d' % cls.RPM_OUTLET_MAP[device_hostname.host]
180 def get_hydra_hostname(cls, device_hostname): argument
188 row = device_hostname.row
189 rack = device_hostname.rack
196 device_hostname)
207 def get_rpm_hostname(cls, device_hostname): argument
216 device_hostname.lab, device_hostname.row,
217 device_hostname.rack)
221 def get_rpm_outlet(cls, device_hostname): argument
229 return '.A%d' % device_hostname.host
283 def is_densified(cls, device_hostname): argument
290 return device_hostname.rack in (0, 12, 13)
294 def get_rpm_hostname(cls, device_hostname): argument
302 row = device_hostname.row
311 if cls.is_densified(device_hostname):
318 rpm_number = 1 if (row + device_hostname.host) % 2 == 1 else 2
323 device_hostname.lab,
324 rpm_row, device_hostname.rack, rpm_number)
328 def get_rpm_outlet(cls, device_hostname): argument
338 if cls.is_densified(device_hostname) else
340 outlet_number = outlet_map[(device_hostname.row % 2,
341 device_hostname.host)]
345 device_hostname)
350 def get_hydra_hostname(cls, device_hostname): argument
358 row = device_hostname.row
359 rack = device_hostname.rack
372 device_hostname)
376 def parse_device_hostname(device_hostname): argument
386 m = re.match(HOST_REGX, device_hostname.strip())
394 logging.error('Could not parse %s', device_hostname)
412 device_hostname = parse_device_hostname(host.hostname)
413 if not device_hostname:
416 if lab.is_device_in_the_lab(device_hostname):
417 rpm_hostname = lab.get_rpm_hostname(device_hostname)
418 rpm_outlet = lab.get_rpm_outlet(device_hostname)
419 hydra_hostname = lab.get_hydra_hostname(device_hostname)