Skip to content

Instantly share code, notes, and snippets.

======================================================================
ERROR: Failure: SyntaxError ('continue' not properly in loop (test.py, line 67))
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/nose/loader.py", line 364, in loadTestsFromName
addr.filename, addr.module)
File "/usr/lib/python2.6/site-packages/nose/importer.py", line 39, in importFromPath
return self.importFromDir(dir_path, fqname)
File "/usr/lib/python2.6/site-packages/nose/importer.py", line 84, in importFromDir
mod = load_module(part_fqname, fh, filename, desc)
Traceback (most recent call last):
File "bin/rho", line 22, in <module>
CLI().main()
File "/home/adrian/src/rho/src/rho/cli.py", line 95, in main
cmd.main()
File "/home/adrian/src/rho/src/rho/clicommands.py", line 86, in main
self._do_command()
File "/home/adrian/src/rho/src/rho/clicommands.py", line 247, in _do_command
crypto.write_file(self.options.config, c, self.passphrase)
File "/home/adrian/src/rho/src/rho/crypto.py", line 125, in write_file
Password:
Traceback (most recent call last):
File "bin/rho", line 22, in <module>
CLI().main()
File "/home/adrian/src/rho/src/rho/cli.py", line 95, in main
cmd.main()
File "/home/adrian/src/rho/src/rho/clicommands.py", line 84, in main
self.config = self._read_config(self.options.config, self.passphrase)
File "/home/adrian/src/rho/src/rho/clicommands.py", line 64, in _read_config
confstr = crypto.read_file(filename, passphrase)
[adrian@alikins rho]$ PYTHONPATH=~/src/rho/src/ bin/rho profile add --name group1 --ip_start 192.168.1.1 --ip_end 192.168.1.100
Password:
Traceback (most recent call last):
File "bin/rho", line 22, in <module>
CLI().main()
File "/home/adrian/src/rho/src/rho/cli.py", line 95, in main
cmd.main()
File "/home/adrian/src/rho/src/rho/clicommands.py", line 87, in main
self._do_command()
File "/home/adrian/src/rho/src/rho/clicommands.py", line 164, in _do_command
adrian@alikins rho]$ PYTHONPATH=~/src/rho/src/ bin/rho profile add --name group3 --ip_start 192.168.1.1 --ip_end 192.168.1.100 --ports 22
Password:
{"credentials": [{"username": "root", "password": "cobbler", "type": "ssh", "name": "default"}], "version": 1, "groups": [{"credentials": [], "range": null, "name": "group1", "ports": [22]}, {"credentials": [], "range": null, "name": "group2", "ports": [22]}, {"credentials": [], "range": null, "name": "group3", "ports": ["22"]}]}
[adrian@alikins rho]$ PYTHONPATH=~/src/rho/src/ bin/rho profile show
Password:
{'credentials': [], 'range': None, 'name': 'group1', 'ports': [22]}
{'credentials': [], 'range': None, 'name': 'group2', 'ports': [22]}
{'credentials': [], 'range': None, 'name': 'group3', 'ports': [22]}
[adrian@alikins rho]$ rho scan --show-fields
auth.name:name of authentication class
auth.type:type of ssh authentication used
auth.username:username ssh
cpu.count:number of processors
error:any errors that are found
etc-issue.etc-issue:contents of /etc/issue
etc-release.etc-release:contents of /etc/release (or equilivent)
instnum.instnum:installation number
ip:ip address
[adrian@alikins rho]$ rho scan --report-format uname.os,ip,cpu.count,redhat-release.name,error rsa_key
Linux,10.11.231.195,2,fedora-release,
rho is a ssh based network inventory tool. It is used to scan a range of
machines, and report basic information about the os installed on them.
* Assumptions:
- it runs on a "Red Hat" ish machine (RHEL, Fedora)
- The machine rho can reach the machines to be scanned
- The machines to be scanned are running ssh
- The user account rho uses for a machine should have a sh like shell
- The user account rho uses has permission need to run commands and
[color]
diff = auto
status = auto
branch = auto
[merge]
#tool = meld
tool = kdiff3
#tool = diffuse
[alias]
# search logs for a bugzilla like number
findbug = "!sh -c 'git log --grep ^$1:' -"
# show what tag/release a bus was part of, occasionally conu
bugrelease = "!sh -c 'git name-rev --tags --name-only $(git log --grep ^$1: --pretty=\"format:%H\n\")' -"