Lines Matching refs:hostname
156 # build up the list of connection information (hostname, username, password, port)
159 hostname = hcd['hostname']
168 username = raw_input('%s username: ' % hostname)
174 password = getpass.getpass('%s password: ' % hostname)
175 host_names.append(hostname)
176 hive_connect_info[hostname] = (hostname, username, password, port)
178 for hostname in host_names:
179 print 'connecting to', hostname
181 fout = file("log_"+hostname, "w")
182 hive[hostname] = pxssh.pxssh()
183 hive[hostname].login(*hive_connect_info[hostname])
184 print hive[hostname].before
185 hive[hostname].logfile = fout
190 print 'Skipping', hostname
191 hive[hostname] = None
221 for hostname in target_hostnames:
222 if hive[hostname] is None:
224 print '| ' + hostname + ' is DEAD'
228 print '| ' + hostname
230 print hive[hostname].before
235 for hostname in target_hostnames:
236 if hive[hostname] is None:
238 print '| ' + hostname + ' is DEAD'
242 print '| ' + hostname
244 print hive[hostname].before
255 for hostname in target_hostnames:
257 if hive[hostname] is not None:
258 hive[hostname].set_unique_prompt()
260 print "Had trouble communicating with %s, so removing it from the target list." % hostname
262 hive[hostname] = None
266 for hostname in target_hostnames:
268 if hive[hostname] is not None:
269 hive[hostname].send(txt)
271 print "Had trouble communicating with %s, so removing it from the target list." % hostname
273 hive[hostname] = None
276 cmd, hostname, txt = cmd.split(None,2)
277 if hive[hostname] is None:
279 print '| ' + hostname + ' is DEAD'
283 hive[hostname].sendline (txt)
284 hive[hostname].prompt(timeout=2)
286 print '| ' + hostname
288 print hive[hostname].before
290 print "Had trouble communicating with %s, so removing it from the target list." % hostname
292 hive[hostname] = None
298 for hostname in target_hostnames:
299 if hive[hostname] is not None:
300 hive[hostname].expect(pattern)
301 print hive[hostname].before
303 print "Had trouble communicating with %s, so removing it from the target list." % hostname
305 hive[hostname] = None
322 for hostname in target_hostnames:
324 if hive[hostname] is not None:
325 hive[hostname].sendcontrol(c)
327 print "Had trouble communicating with %s, so removing it from the target list." % hostname
329 hive[hostname] = None
332 for hostname in target_hostnames:
333 if hive[hostname] is not None:
334 hive[hostname].send(chr(27))
339 for hostname in target_hostnames:
341 if hive[hostname] is not None:
342 hive[hostname].sendline (cmd)
344 print "Had trouble communicating with %s, so removing it from the target list." % hostname
346 hive[hostname] = None
352 for hostname in target_hostnames:
354 if hive[hostname] is None:
356 print '| ' + hostname + ' is DEAD'
359 hive[hostname].prompt(timeout=2)
361 print '| ' + hostname
363 print hive[hostname].before
365 print "Had trouble communicating with %s, so removing it from the target list." % hostname
367 hive[hostname] = None
376 for hostname in hive_names:
377 hive[hostname].expect([pexpect.TIMEOUT,pexpect.EOF],timeout=timeout)
391 for hostname in hive_names:
393 if not hive[hostname].prompt(timeout=timeout):
399 username:password@hostname:port. All fields are options expcet hostname. A
405 p = re.compile (r'(?P<username>[^@:]*)(:?)(?P<password>.*)(?!\\)@(?P<hostname>[^:]*):?(?P<port>[0-9]*)')
407 p = re.compile (r'(?P<username>)(?P<password>)(?P<hostname>[^:]*):?(?P<port>[0-9]*)')