Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3 conv #4

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 10 additions & 10 deletions TestInput.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import re
from builds.build_query import BuildQuery
import logger
import ConfigParser
import configparser
import os
import collections

Expand Down Expand Up @@ -129,7 +129,7 @@ def get_test_input(argv):
ini_file = ''
for option, argument in opts:
if option == '-h':
print 'usage'
print('usage')
return
if option == '-i':
has_ini = True
Expand All @@ -138,15 +138,15 @@ def get_test_input(argv):
# takes in a string of the form "p1=v1,v2,p2=v3,p3=v4,v5,v6"
# converts to a dictionary of the form {"p1":"v1,v2","p2":"v3","p3":"v4,v5,v6"}
argument_split = [a.strip() for a in re.split("[,]?([^,=]+)=", argument)[1:]]
pairs = dict(zip(argument_split[::2], argument_split[1::2]))
for pair in pairs.iteritems():
pairs = dict(list(zip(argument_split[::2], argument_split[1::2])))
for pair in pairs.items():
if pair[0] == "vbuckets":
# takes in a string of the form "1-100,140,150-160"
# converts to an array with all those values inclusive
vbuckets = set()
for v in pair[1].split(","):
r = v.split("-")
vbuckets.update(range(int(r[0]), int(r[-1]) + 1))
vbuckets.update(list(range(int(r[0]), int(r[-1]) + 1)))
params[pair[0]] = sorted(vbuckets)
else:
argument_list = [a.strip() for a in pair[1].split(",")]
Expand All @@ -167,9 +167,9 @@ def get_test_input(argv):
input = TestInputParser.parse_from_command_line(argv)
input.test_params = params

if "num_clients" not in input.test_params.keys() and input.clients: # do not override the command line value
if "num_clients" not in list(input.test_params.keys()) and input.clients: # do not override the command line value
input.test_params["num_clients"] = len(input.clients)
if "num_nodes" not in input.test_params.keys() and input.servers:
if "num_nodes" not in list(input.test_params.keys()) and input.servers:
input.test_params["num_nodes"] = len(input.servers)

return input
Expand All @@ -179,7 +179,7 @@ def parse_from_file(file):
servers = []
ips = []
input = TestInput()
config = ConfigParser.ConfigParser()
config = configparser.ConfigParser()
config.read(file)
sections = config.sections()
global_properties = {}
Expand Down Expand Up @@ -234,7 +234,7 @@ def parse_from_file(file):
input.tuq_client['client'] = TestInputParser.get_server_options([input.tuq_client['client'],],
input.membase_settings,
global_properties)[0]
for key, value in clusters.items():
for key, value in list(clusters.items()):
end += value
input.clusters[key] = servers[start:end]
start += value
Expand Down Expand Up @@ -442,7 +442,7 @@ def parse_from_command_line(argv):
need_help = False
for option, argument in opts:
if option == "-h":
print 'usage...'
print('usage...')
need_help = True
break
if need_help:
Expand Down
20 changes: 20 additions & 0 deletions b/resources/1-node-rqg-template-cbas.ini.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
[global]
port:8091
username:root
password:couchbase
index_port:9102
index_path:/data/indexer

[servers]
1:_1

[_1]
ip:dynamic
index_port:9102
port:8091
services=n1ql,kv,index,cbas


[membase]
rest_username:Administrator
rest_password:password
29 changes: 29 additions & 0 deletions b/resources/base.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[global]
username:root
password:couchbase

[membase]
rest_username:Administrator
rest_password:admin_123

[servers]
1:_1
2:_2
3:_3
4:_4

[_1]
ip:10.112.190.101
port:8091

[_2]
ip:10.112.190.102
port:8091

[_3]
ip:10.112.190.103
port:8091

[_4]
ip:10.112.190.104
port:8091
2 changes: 2 additions & 0 deletions conf/cbas/py-analytics-rqg.conf.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
rqg.test_rqg_asterix.RQGASTERIXTests:
test_rqg_concurrent,test_file_path=b/resources/cbas_rqg/simple_table_db/query_tests_using_templates/cbas_query_arithmetic_functions_10000.txt.zip,database=multiple_table_db,reset_database=True,concurreny_count=1,index_quota_percent=30,password=password,use_mysql=True,replicas=0,create_secondary_indexes=True,run_query_with_primary=True,record_failure=True,failure_record_path=/tmp,nodes_init=1,build_index_batch_size=1000,build_secondary_index_in_seq=True,nodes_init=1,number_of_buckets=1,total_queries=10000,skip_cleanup=false,GROUP=arithmetic_functions
7 changes: 7 additions & 0 deletions conf/temp.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
rebalance.rebalance_progress.RebalanceProgressTests:
test_progress_rebalance_in,nodes_in=1,GROUP=P0,blob_generator=false
test_progress_rebalance_in,nodes_in=1,GROUP=P0,blob_generator=false
test_progress_rebalance_in,nodes_in=1,GROUP=P0,blob_generator=false



3 changes: 3 additions & 0 deletions etc-issue-007300d8-9abd-4d7f-b339-6194cd675b57
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-007ebfd2-857c-4241-abc8-2d54dbd1de61
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-03173d11-5568-44ab-9cd2-2613034d7a43
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-0eca1e20-3fa5-4ce4-b0a0-d3fd711faafe
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-149468ec-5329-44fa-9de4-6a9076e4ef32
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-1bf725bf-c303-4024-93da-4c3b5b064978
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-22dc096f-5f68-461c-a36a-e63fe498526a
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-3299d62a-f854-46be-9fcb-485d9c83aba6
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-3dbc9a41-9082-4592-9796-bef4574be46a
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-410fd784-e8ce-4a79-a9bb-fe3576658d22
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-440a4d74-10b3-475a-80f9-1b1f25dcf828
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-46f8e2b6-fdf0-4402-8e7b-e2b64906da64
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-499a840d-bc04-4be0-9150-d0210ef532d3
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-520e8daf-1062-42dd-8f7d-fac63b87c314
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-5f8c6ecd-672b-4d1d-9654-8076c530f296
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-736a1c1c-210d-44d3-82c8-52f523a09400
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-7631ebed-362e-4c2d-9e89-3a7a01d7fbdd
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-789f5cea-c9d4-4423-85cd-d761b44e3d69
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-7d14675b-1553-4358-89bd-bf69b6265aca
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-8443ce5f-f610-4e3c-ac2b-f3c50978992b
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-8a0a3eaf-ce56-408d-8f6e-9104ab0f2b32
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-8bba9bc4-7122-41ad-acbb-615c5e06429d
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-8d9a2aa1-bb3f-43ef-aa67-af037da583e4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-8e0c5455-00af-4d84-a769-18465c0aceb4
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-9b0d72a7-6a5e-4a01-be91-f7d23d1a656e
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-a07296dc-0333-4706-87e4-0ededdb75e88
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-a1250961-6e6d-4855-bef2-6e03a995f038
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-a40c7182-7bc3-4f5c-8cac-e781fb082bae
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-a5857a56-6815-4d7f-b4bd-319b0a1d2798
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-b06c9484-0621-42c0-a145-44972363e8ca
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-b85335f2-9084-41d4-95d5-2697679d3115
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-baca7218-b9c5-430c-a6d8-b09c6846ec8d
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-bdd86d36-ab28-4dcf-ae0f-fc7bfb22b5d6
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-c051b8e6-d378-4841-b5cd-43a24515ac26
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-c278f4fb-c991-4cb4-bf42-08e070d45da2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-cd401b5d-bb4d-41d3-90f8-74bf28a54b45
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-d1fc7a0b-1fba-4f78-bc6f-c69bfbffcd97
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-e11b79da-812e-49ea-bd6e-ef517d619a3b
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-e46cd582-4869-46fe-9e79-1bfc1bd254d7
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-e8e4ba26-40c5-4c3e-9bb8-66e188f6dbb2
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-ec66fab7-f004-4cdb-b579-3475e5eed851
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-ee21a4e9-a646-4cd9-83fa-f767c03f5869
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-efd19bde-ec14-4695-9cc7-5fe23b668b59
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

3 changes: 3 additions & 0 deletions etc-issue-f4b290b4-531c-4f02-ad4f-c2d6fe753a0d
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
\S
Kernel \r on an \m

2 changes: 1 addition & 1 deletion lib/EC2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import base64
import hmac
import httplib
import http.client as httplib
import re
import sys
import time
Expand Down
18 changes: 9 additions & 9 deletions lib/builds/build_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# map a version # -> rpm url
from datetime import datetime
import time
import urllib2
import urllib
import re
import socket
import BeautifulSoup
from bs4 import BeautifulSoup
import testconstants
import logger
import traceback
Expand Down Expand Up @@ -577,15 +577,15 @@ def _get_and_parse_builds(self, build_page, version=None, timeout=None, direct_b
build.url = '%s/%s' % (build_page, build_id)
builds.append(build)
except Exception as e:
print "ERROR in creating build/change info for: Build_id: %s , Build_Description: %s" % (build_id, build_description)
print traceback.print_exc(file=sys.stderr)
print("ERROR in creating build/change info for: Build_id: %s , Build_Description: %s" % (build_id, build_description))
print(traceback.print_exc(file=sys.stderr))
#raise e : Skipping parsing for this build information,
#Eventually, It will fail with build not found error at install.py:240
for build in builds:
for change in changes:
if change.build_number == build.product_version:
build.change = change
""" print 'change : ', change.url,change.build_number """
""" print'change : ', change.url,change.build_number """
break
return builds, changes

Expand Down Expand Up @@ -1064,15 +1064,15 @@ def _product_size(self, build_description):
#q = BuildQuery()
#builds, changes = q.get_latest_builds()
#for build in builds:
# print build.product,' ',build.time ,' ',build.deliverable_type,' ',build.product_version ,'',build.size,'',build.architecture_type
# print(build.product,' ',build.time ,' ',build.deliverable_type,' ',build.product_version ,'',build.size,'',build.architecture_type)
# if build.change:
# change = build.change
# print change.name,change.build_number,change.time,change.url
# printchange.name,change.build_number,change.time,change.url

#for change in changes:
# print change.name,change.build_number,change.time
# print(change.name,change.build_number,change.time)

#builds = q.get_membase_latest_builds()
#for build in builds:
# print build.product,' ',build.time ,' ',build.deliverable_type,' ',build.product_version ,'',build.size,'',build.architecture_type
# print(build.product,' ',build.time ,' ',build.deliverable_type,' ',build.product_version ,'',build.size,'',build.architecture_type)

Loading