zrhoffman commented on a change in pull request #4764:
URL: https://github.com/apache/trafficcontrol/pull/4764#discussion_r436849979



##########
File path: infrastructure/cdn-in-a-box/traffic_ops/adduser.pl
##########
@@ -24,23 +24,27 @@
 use Crypt::ScryptKDF qw{ scrypt_hash };
 
 if ($#ARGV < 2) {
-    die "Usage: $ARGV[0] <username> <password> <role>\n";
+    die "Usage: $ARGV[0] USERNAME PASSWORD [ROLE] [TENANT] [EMAIL] 
[FULL_NAME]\n";
 }
 
 my $username = shift // 'admin';
 my $password = shift or die "Password is required\n";
 my $role = shift // 'admin';
 my $tenant = shift // 'root';
+my $email = shift // '[email protected]';
+my $full_name = shift // 'James Cole'

Review comment:
       `James Cole` should be an environment variable, Perl can be used to 
retrieve it.

##########
File path: infrastructure/cdn-in-a-box/traffic_ops/adduser.pl
##########
@@ -24,23 +24,27 @@
 use Crypt::ScryptKDF qw{ scrypt_hash };
 
 if ($#ARGV < 2) {
-    die "Usage: $ARGV[0] <username> <password> <role>\n";
+    die "Usage: $ARGV[0] USERNAME PASSWORD [ROLE] [TENANT] [EMAIL] 
[FULL_NAME]\n";
 }
 
 my $username = shift // 'admin';
 my $password = shift or die "Password is required\n";
 my $role = shift // 'admin';
 my $tenant = shift // 'root';
+my $email = shift // '[email protected]';

Review comment:
       Might as well set `TO_EMAIL` to this value and use that, since 
`TO_EMAIL` is not currently used anywhere. Perl can be used to retrieve it.

##########
File path: infrastructure/cdn-in-a-box/traffic_ops/adduser.pl
##########
@@ -24,23 +24,27 @@
 use Crypt::ScryptKDF qw{ scrypt_hash };
 
 if ($#ARGV < 2) {
-    die "Usage: $ARGV[0] <username> <password> <role>\n";
+    die "Usage: $ARGV[0] USERNAME PASSWORD [ROLE] [TENANT] [EMAIL] 
[FULL_NAME]\n";
 }
 
 my $username = shift // 'admin';
 my $password = shift or die "Password is required\n";
 my $role = shift // 'admin';
 my $tenant = shift // 'root';
+my $email = shift // '[email protected]';
+my $full_name = shift // 'James Cole'

Review comment:
       Yeah that looks good.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to