Move gerrit scripts to puppet.
Take the things from openstack-ci/gerrit and move them directly
in to the puppet module. Install them using the model we're using
for the jenkins slave scripts.
Change-Id: I420b2b895bd57d40232b2cdda437617373a82890
diff --git a/get_group_uuid.py b/get_group_uuid.py
new file mode 100644
index 0000000..335e944
--- /dev/null
+++ b/get_group_uuid.py
@@ -0,0 +1,29 @@
+import argparse
+import paramiko
+import json
+
+parser = argparse.ArgumentParser()
+parser.add_argument("--host", dest="host", default="review.openstack.org",
+ help="gerrit host to connect to")
+parser.add_argument("--port", dest="port", action='store', type=int,
+ default=29418, help="gerrit port to connect to")
+parser.add_argument("groups", nargs=1)
+
+options = parser.parse_args()
+
+
+client = paramiko.SSHClient()
+client.load_system_host_keys()
+client.set_missing_host_key_policy(paramiko.WarningPolicy())
+client.connect(options.host, port=options.port)
+
+group = options.groups[0]
+query = "select group_uuid from account_groups where name = '%s'" % group
+command = 'gerrit gsql --format JSON -c "%s"' % query
+stdin, stdout, stderr = client.exec_command(command)
+
+for line in stdout:
+ row = json.loads(line)
+ if row['type'] == 'row':
+ print row['columns']['group_uuid']
+ ret = stdout.channel.recv_exit_status()