@@ -1139,6 +1139,9 @@ def gremlin(self, line, cell, local_ns: dict = None):
11391139 help = 'Enable debug mode.' )
11401140 parser .add_argument ('--profile-misc-args' , type = str , default = '{}' ,
11411141 help = 'Additional profile options, passed in as a map.' )
1142+ parser .add_argument ('--use-port' , action = 'store_true' , default = False ,
1143+ help = 'Includes the port in the URI for applicable Neptune HTTP requests where it is '
1144+ 'excluded by default.' )
11421145 parser .add_argument ('-sp' , '--stop-physics' , action = 'store_true' , default = False ,
11431146 help = "Disable visualization physics after the initial simulation stabilizes." )
11441147 parser .add_argument ('-sd' , '--simulation-duration' , type = int , default = 1500 ,
@@ -1208,7 +1211,8 @@ def gremlin(self, line, cell, local_ns: dict = None):
12081211 if self .client .is_analytics_domain () and query_params :
12091212 explain_args ['parameters' ] = query_params
12101213 res = self .client .gremlin_explain (cell ,
1211- args = explain_args )
1214+ args = explain_args ,
1215+ use_port = args .use_port )
12121216 res .raise_for_status ()
12131217 except Exception as e :
12141218 if self .client .is_analytics_domain ():
@@ -1251,7 +1255,9 @@ def gremlin(self, line, cell, local_ns: dict = None):
12511255 print ('--profile-misc-args received invalid input, please check that you are passing in a valid '
12521256 'string representation of a map, ex. "{\' profile.x\' :\' true\' }"' )
12531257 try :
1254- res = self .client .gremlin_profile (query = cell , args = profile_args )
1258+ res = self .client .gremlin_profile (query = cell ,
1259+ args = profile_args ,
1260+ use_port = args .use_port )
12551261 res .raise_for_status ()
12561262 except Exception as e :
12571263 if self .client .is_analytics_domain ():
@@ -1302,7 +1308,8 @@ def gremlin(self, line, cell, local_ns: dict = None):
13021308 passed_params = query_params if self .client .is_analytics_domain () else None
13031309 query_res_http = self .client .gremlin_http_query (cell ,
13041310 headers = headers ,
1305- query_params = passed_params )
1311+ query_params = passed_params ,
1312+ use_port = args .use_port )
13061313 query_res_http .raise_for_status ()
13071314 try :
13081315 query_res_http_json = query_res_http .json ()
@@ -3550,6 +3557,9 @@ def handle_opencypher_query(self, line, cell, local_ns):
35503557 parser .add_argument ('-qp' , '--query-parameters' , type = str , default = '' ,
35513558 help = 'Parameter definitions to apply to the query. This option can accept a local variable '
35523559 'name, or a string representation of the map.' )
3560+ parser .add_argument ('--use-port' , action = 'store_true' , default = False ,
3561+ help = 'Includes the port in the URI for applicable Neptune HTTP requests where it is '
3562+ 'excluded by default.' )
35533563 parser .add_argument ('-g' , '--group-by' , type = str , default = '~labels' ,
35543564 help = 'Property used to group nodes (e.g. code, ~id) default is ~labels' )
35553565 parser .add_argument ('-gd' , '--group-by-depth' , action = 'store_true' , default = False ,
@@ -3638,7 +3648,8 @@ def handle_opencypher_query(self, line, cell, local_ns):
36383648 explain = args .explain_type ,
36393649 query_params = query_params ,
36403650 plan_cache = args .plan_cache ,
3641- query_timeout = args .query_timeout )
3651+ query_timeout = args .query_timeout ,
3652+ use_port = args .use_port )
36423653 query_time = time .time () * 1000 - query_start
36433654 res_replace_chars = res .content .replace (b'$' , b'\$' )
36443655 explain = res_replace_chars .decode ("utf-8" )
@@ -3660,7 +3671,8 @@ def handle_opencypher_query(self, line, cell, local_ns):
36603671 oc_http = self .client .opencypher_http (cell ,
36613672 query_params = query_params ,
36623673 plan_cache = args .plan_cache ,
3663- query_timeout = args .query_timeout )
3674+ query_timeout = args .query_timeout ,
3675+ use_port = args .use_port )
36643676 query_time = time .time () * 1000 - query_start
36653677 if oc_http .status_code == 400 and not self .client .is_analytics_domain () and args .plan_cache != "auto" :
36663678 try :
0 commit comments