File tree Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Expand file tree Collapse file tree 4 files changed +12
-7
lines changed Original file line number Diff line number Diff line change 12
12
#
13
13
# The default settings below are sufficient if the Cloud Simulator has been
14
14
# started on the endpoint, localhost:8080, which is its default. If not, the
15
- # parameters in this file should be changed as needed.
15
+ # parameters in this file should be changed as needed. Please see sample config
16
+ # options in: config_cloudsim.py, config_onprem.py and config_cloud.py, change
17
+ # the parameters in those files, then copy the content to this file.
16
18
#
17
19
18
20
# The endpoint to use to connect to the service. This endpoint is for a Cloud
19
21
# Simulator running on its default port (8080) on the local machine.
20
22
endpoint = 'localhost:8080'
21
23
22
- # The server type, please don't change it .
24
+ # The server type.
23
25
server_type = 'cloudsim'
Original file line number Diff line number Diff line change @@ -1212,7 +1212,7 @@ def create_url(endpoint, path):
1212
1212
1213
1213
# Strip out any slashes if the format was protocol://host[:port]
1214
1214
if host .startswith ('//' ):
1215
- host = host [ 2 :]
1215
+ host = host . lstrip ( '/' )
1216
1216
1217
1217
if protocol != 'http' and protocol != 'https' :
1218
1218
raise IllegalArgumentException (
@@ -1223,6 +1223,8 @@ def create_url(endpoint, path):
1223
1223
def validate_port (endpoint , portstring ):
1224
1224
# Check that a port is a valid, non negative integer.
1225
1225
try :
1226
+ # Strip out any slashes after the port string.
1227
+ portstring = portstring .rstrip ('/' )
1226
1228
port = int (portstring )
1227
1229
CheckValue .check_int_ge_zero (port , 'port' )
1228
1230
return port
Original file line number Diff line number Diff line change 13
13
#
14
14
# The default settings below are sufficient if the Cloud Simulator has been
15
15
# started on the endpoint, localhost:8080, which is its default. If not, the
16
- # parameters in this file should be changed as needed.
16
+ # parameters in this file should be changed as needed. Please see sample config
17
+ # options in: config_cloudsim.py and config_onprem.py, change the parameters
18
+ # in those files, then copy the content to this file.
17
19
#
18
20
19
21
# The endpoint to use to connect to the service. This endpoint is for a Cloud
20
22
# Simulator running on its default port (8080) on the local machine.
21
23
endpoint = 'localhost:8080'
22
24
23
- # The server type, please don't change it .
25
+ # The server type.
24
26
server_type = 'cloudsim'
25
27
26
28
# Cloud Simulator version. Use None to test with the latest Cloud Simulator
Original file line number Diff line number Diff line change @@ -253,8 +253,7 @@ def testQueryStatementSelectWithMaxReadKb(self):
253
253
self .query_request .set_statement (query_statement ).set_max_read_kb (
254
254
max_read_kb )
255
255
result = self .handle .query (self .query_request )
256
- if (is_onprem () and version is not None and
257
- compare_version (version , '20.2.0' ) == - 1 ):
256
+ if is_onprem ():
258
257
records = self .check_query_result (result , num_records )
259
258
else :
260
259
records = self .check_query_result (result , max_read_kb + 1 , True )
You can’t perform that action at this time.
0 commit comments