You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2022/04/08 17:44:27 UTC

[GitHub] [cassandra] maulin-vasavada commented on a diff in pull request #1538: CASSANDRA-16456 - Add Plugin Support for CQLSH

maulin-vasavada commented on code in PR #1538:
URL: https://github.com/apache/cassandra/pull/1538#discussion_r846352702


##########
bin/cqlsh.py:
##########
@@ -2384,7 +2441,8 @@ def main(options, hostname, port):
                       single_statement=options.execute,
                       request_timeout=options.request_timeout,
                       connect_timeout=options.connect_timeout,
-                      encoding=options.encoding)
+                      encoding=options.encoding,
+                      auth_provider=load_auth_provider(options))

Review Comment:
   thanks!



##########
bin/cqlsh.py:
##########
@@ -98,6 +99,33 @@
     ZIPLIB_DIRS = ()
 
 
+def parse_auth_provider_extended(option, opt_str, value, passed_parser):
+    splits = opt_str.split('.')
+    if len(splits) > 2:
+        raise optparse.OptionValueError("Invalid --AuthProviderExtended argument only single period should be found: %s" % opt_str)
+    if len(splits) < 2:
+        raise optparse.OptionValueError("Invalid --AuthProviderExtended must provide a param using period: %s" % opt_str)
+    key = splits[1]
+
+    if not hasattr(passed_parser.values, 'auth_provider_extended') or parser.values.auth_provider_extended is None:
+        passed_parser.values.auth_provider_extended = {}
+
+    passed_parser.values.auth_provider_extended[key] = value

Review Comment:
   thanks! 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org