diff --git a/bin/dx_set_envpass.pl b/bin/dx_set_envpass.pl index 750f4c7..98c7e52 100755 --- a/bin/dx_set_envpass.pl +++ b/bin/dx_set_envpass.pl @@ -146,7 +146,7 @@ } else { if ( $hostref ne 'CLUSTER' ) { my $nodeaddr = $hosts->getHostAddr($hostref); - ($connfault, $result) = $engine_obj->checkConnectorconnectivity($username, $password, $nodeaddr); + ($connfault, $result) = $engine_obj->checkConnectorconnectivity($username, $password, $nodeaddr, $environments->getProxy($envitem)); } diff --git a/lib/Engine.pm b/lib/Engine.pm index d2ed8af..fbff687 100644 --- a/lib/Engine.pm +++ b/lib/Engine.pm @@ -1274,6 +1274,7 @@ sub checkConnectorconnectivity { my $username = shift; my $password = shift; my $host = shift; + my $proxy = shift; logger($self->{_debug}, "Entering Engine::checkConnectorconnectivity",1); @@ -1287,6 +1288,11 @@ sub checkConnectorconnectivity { "username" => $username ); + + if (defined($proxy) && ($proxy ne "N/A")) { + $conn_hash{'proxy'} = $proxy; + } + my $json_data = to_json(\%conn_hash, {pretty=>1}); my $operation = "resources/json/delphix/connectivity/connector"; diff --git a/lib/Environment_obj.pm b/lib/Environment_obj.pm index 741b0c2..86f4070 100644 --- a/lib/Environment_obj.pm +++ b/lib/Environment_obj.pm @@ -681,7 +681,7 @@ sub getEnvironmentUserByName { logger($self->{_debug}, "Environment ref ". Dumper $name , 2); logger($self->{_debug}, "Environment users ". Dumper $users , 2); logger($self->{_debug}, "Looking for user ". Dumper $username , 2); - my @t = grep { $users->{$_}->{name} eq $username } keys %{$users}; + my @t = grep { lc $users->{$_}->{name} eq lc $username } keys %{$users}; logger($self->{_debug}, "matching users ". Dumper \@t , 2); # if (defined($users->{$username})) { # $ret = $users->{$username}->{reference}; @@ -702,7 +702,7 @@ sub getEnvironmentUserByName { logger($self->{_debug}, "Environment name ". Dumper $name , 2); logger($self->{_debug}, "Environment users ". Dumper $users , 2); logger($self->{_debug}, "Looking for user ". Dumper $username , 2); - my @t = grep { $users->{$_}->{name} eq $username } keys %{$users}; + my @t = grep { lc $users->{$_}->{name} eq lc $username } keys %{$users}; logger($self->{_debug}, "matching users ". Dumper \@t , 2); if (scalar(@t) > 1) { print "Too many users found\n";