Skip to content

Commit

Permalink
fix for change passwords in the source mssql nvironments
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcin Przepiorowski committed Feb 8, 2024
1 parent b2cabb0 commit 1fa1034
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion bin/dx_set_envpass.pl
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}


Expand Down
6 changes: 6 additions & 0 deletions lib/Engine.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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";
Expand Down
4 changes: 2 additions & 2 deletions lib/Environment_obj.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand All @@ -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";
Expand Down

0 comments on commit 1fa1034

Please sign in to comment.