diff options
author | Neil Williams <neil.williams@linaro.org> | 2015-12-02 11:21:53 +0000 |
---|---|---|
committer | Neil Williams <neil.williams@linaro.org> | 2015-12-02 11:21:53 +0000 |
commit | 322eae086e792b187bd9d221ea33e173441abfc5 (patch) | |
tree | 748abea5bdab1212e10c36554d0e6c05feb40289 | |
parent | 2030113f430bef11a6804bdf8791fafbad8c8064 (diff) |
Add a simple script to view the network map.
Copy into ./local/ and add your LAVA API token,
username, hostname (lng.validation.linaro.org) and
the protocol (https for lng.v.l.o).
Change-Id: Ib0a2ab8653ce57c96fce1197eba57ba6b3dd3ae6
-rwxr-xr-x | checkmap.py | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/checkmap.py b/checkmap.py new file mode 100755 index 0000000..bce0c5f --- /dev/null +++ b/checkmap.py @@ -0,0 +1,40 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +# +# checkmap.py +# +# Copyright 2015 Neil Williams <codehelp@debian.org> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1301, USA. +# +# + +import yaml +import xmlrpclib + +TOKEN="" +USER="" +HOSTNAME="" +PROTOCOL="" + +def main(args): + connection = xmlrpclib.ServerProxy("%s://%s:%s@%s//RPC2" % (PROTOCOL, USER, TOKEN, HOSTNAME)) + print connection.system.pipeline_network_map() + return 0 + +if __name__ == '__main__': + import sys + sys.exit(main(sys.argv)) |