Skip to content

Commit c7c1890

Browse files
author
Marcin Przepiorowski
committed
v2.4.14.1
2 parents a2a560e + fc344b8 commit c7c1890

14 files changed

+117
-50
lines changed

bin/dx_get_db_env.pl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,9 @@
450450
}
451451

452452
if (lc $parentlast eq 'l') {
453-
my $dsource_snaps = new Snapshot_obj($engine_obj,$dbobj->getReference(), undef, $debug);
453+
my $dbref = $dbobj->getReference();
454+
my $dsource_snaps = new Snapshot_obj($engine_obj, $dbref, undef, $debug);
455+
$dsource_snaps->getSnapshotList($dbref);
454456
($snaptime,$timezone) = $dsource_snaps->getLatestSnapshotTime();
455457
$parenttime = 'N/A';
456458
}

lib/OracleVDB_obj.pm

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2471,6 +2471,60 @@ sub createVDB {
24712471
}
24722472

24732473

2474+
# Procedure setFileSystemLayout
2475+
# parameters:
2476+
# - map_file - hash of map file
2477+
# Set mountpoint for new db.
2478+
2479+
sub setFileSystemLayout {
2480+
my $self = shift;
2481+
my $targetDirectory = shift;
2482+
my $archiveDirectory = shift;
2483+
my $dataDirectory = shift;
2484+
my $externalDirectory = shift;
2485+
my $scriptDirectory = shift;
2486+
my $tempDirectory = shift;
2487+
2488+
logger($self->{_debug}, "Entering VDB_obj::setFileSystemLayout",1);
2489+
2490+
2491+
2492+
if (version->parse($self->{_dlpxObject}->getApi()) <= version->parse(1.11.9)) {
2493+
$self->{"NEWDB"}->{"filesystemLayout"}->{"type"} = "TimeflowFilesystemLayout";
2494+
} else {
2495+
# from Delphix 6.0.10 and above
2496+
$self->{"NEWDB"}->{"filesystemLayout"}->{"type"} = "OracleExportTimeflowFilesystemLayout";
2497+
}
2498+
2499+
if (! defined($targetDirectory)) {
2500+
return 1;
2501+
}
2502+
2503+
$self->{"NEWDB"}->{"filesystemLayout"}->{"targetDirectory"} = $targetDirectory;
2504+
2505+
if ( defined($archiveDirectory)) {
2506+
$self->{"NEWDB"}->{"filesystemLayout"}->{"archiveDirectory"} = $archiveDirectory;
2507+
}
2508+
2509+
if ( defined($tempDirectory)) {
2510+
$self->{"NEWDB"}->{"filesystemLayout"}->{"tempDirectory"} = $tempDirectory;
2511+
}
2512+
2513+
if ( defined($scriptDirectory)) {
2514+
$self->{"NEWDB"}->{"filesystemLayout"}->{"scriptDirectory"} = $scriptDirectory;
2515+
}
2516+
2517+
if ( defined($externalDirectory)) {
2518+
$self->{"NEWDB"}->{"filesystemLayout"}->{"externalDirectory"} = $externalDirectory;
2519+
}
2520+
2521+
if ( defined($dataDirectory)) {
2522+
$self->{"NEWDB"}->{"filesystemLayout"}->{"dataDirectory"} = $dataDirectory;
2523+
}
2524+
2525+
}
2526+
2527+
24742528
# Procedure v2pSI
24752529
# parameters:
24762530
# - env - new DB environment
@@ -2498,6 +2552,7 @@ sub v2pSI {
24982552
return undef;
24992553
}
25002554

2555+
25012556
if ( ! defined($self->{"NEWDB"}->{"filesystemLayout"}->{"type"} )) {
25022557
print "Target directory not set. V2P won't be created\n";
25032558
return undef;

lib/Toolkit_helpers.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use File::Spec;
2929

3030
use lib '../lib';
3131

32-
our $version = '2.4.14';
32+
our $version = '2.4.14.1';
3333

3434
my $tz = new Date::Manip::TZ;
3535
my $dt = new Date::Manip::Date;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"preSync" : [],
3-
"postSync" : [],
4-
"type" : "LinkedSourceOperations"
3+
"type" : "LinkedSourceOperations",
4+
"postSync" : []
55
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"preSync" : [],
2+
"type" : "LinkedSourceOperations",
33
"postSync" : [],
4-
"type" : "LinkedSourceOperations"
4+
"preSync" : []
55
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"type" : "LinkedSourceOperations",
32
"postSync" : [],
3+
"type" : "LinkedSourceOperations",
44
"preSync" : []
55
}

test/test_database_list/Soda.dbhooks

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"type" : "LinkedSourceOperations",
2+
"preSync" : [],
33
"postSync" : [],
4-
"preSync" : []
4+
"type" : "LinkedSourceOperations"
55
}

test/test_database_list/database_list.t

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use strict;
22
use Data::Dumper;
3-
use Test::More tests => 13;
3+
use Test::More tests => 15;
44
use Test::Script;
55
use Test::Files;
66
use File::Spec;
@@ -62,6 +62,16 @@ EOF
6262
script_stdout_is $expected_stdout, "list pdbtest2 database results compare";
6363

6464

65+
script_runs(['../../bin/dx_get_db_env.pl', '-d', 'local', '-format','csv','-name','pdbtest2','-parentlast','l',"list pdbtest2 database - last snapshot"]);
66+
67+
my $expected_stdout = <<EOF;
68+
#Appliance,Hostname,Database,Group,Type,SourceDB,Last snapshot,Used(GB),Status,Enabled,Unique Name,Parent time,VDB creation time
69+
local,10.110.196.207,pdbtest2,Analytics,VDB,CDOMLOSRCA1DPDB1,2021-12-17 06:30:15 EST,0.02,RUNNING,enabled,N/A,N/A,2021-12-17 02:06:16
70+
EOF
71+
72+
script_stdout_is $expected_stdout, "list pdbtest2 - last snapshot database results compare";
73+
74+
6575
script_runs(['../../bin/dx_get_db_env.pl', '-d', 'local', '-format','csv','-name','pdbtest2','-config', "list config pdbtest2 database"]);
6676

6777
my $expected_stdout = <<EOF;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2+
"preSync" : [],
23
"type" : "LinkedSourceOperations",
3-
"postSync" : [],
4-
"preSync" : []
4+
"postSync" : []
55
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"preRollback" : [],
2+
"postStop" : [],
3+
"postRollback" : [],
4+
"preStop" : [],
35
"type" : "VirtualSourceOperations",
46
"preRefresh" : [],
57
"preStart" : [],
6-
"preSnapshot" : [],
7-
"preStop" : [],
8-
"postStart" : [],
9-
"configureClone" : [],
8+
"postSnapshot" : [],
9+
"preRollback" : [],
1010
"postRefresh" : [],
11-
"postStop" : [],
12-
"postRollback" : [],
13-
"postSnapshot" : []
11+
"postStart" : [],
12+
"preSnapshot" : [],
13+
"configureClone" : []
1414
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"postRefresh" : [],
3-
"configureClone" : [],
4-
"postStart" : [],
2+
"preStop" : [],
3+
"type" : "VirtualSourceOperations",
4+
"postSnapshot" : [],
5+
"preRollback" : [],
6+
"preStart" : [],
57
"preRefresh" : [],
68
"postRollback" : [],
7-
"preStart" : [],
8-
"postSnapshot" : [],
99
"postStop" : [],
1010
"preSnapshot" : [],
11-
"preStop" : [],
12-
"type" : "VirtualSourceOperations",
13-
"preRollback" : []
11+
"configureClone" : [],
12+
"postStart" : [],
13+
"postRefresh" : []
1414
}
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"postStart" : [],
3+
"preSnapshot" : [],
34
"configureClone" : [],
45
"postRefresh" : [],
5-
"postStop" : [],
6-
"postSnapshot" : [],
7-
"postRollback" : [],
8-
"preSnapshot" : [],
9-
"preStop" : [],
106
"preRefresh" : [],
117
"preStart" : [],
128
"preRollback" : [],
13-
"type" : "VirtualSourceOperations"
9+
"postSnapshot" : [],
10+
"preStop" : [],
11+
"type" : "VirtualSourceOperations",
12+
"postStop" : [],
13+
"postRollback" : []
1414
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"postSnapshot" : [],
3-
"preStart" : [],
2+
"postRefresh" : [],
3+
"preSnapshot" : [],
4+
"configureClone" : [],
5+
"postStart" : [],
46
"postRollback" : [],
57
"postStop" : [],
6-
"postRefresh" : [],
8+
"preStart" : [],
9+
"postSnapshot" : [],
10+
"preRollback" : [],
711
"preRefresh" : [],
8-
"postStart" : [],
9-
"configureClone" : [],
1012
"type" : "VirtualSourceOperations",
11-
"preStop" : [],
12-
"preRollback" : [],
13-
"preSnapshot" : []
13+
"preStop" : []
1414
}
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
2-
"type" : "VirtualSourceOperations",
3-
"preStop" : [],
2+
"preRefresh" : [],
43
"preRollback" : [],
5-
"preSnapshot" : [],
6-
"postSnapshot" : [],
7-
"postRollback" : [],
84
"preStart" : [],
5+
"postSnapshot" : [],
6+
"type" : "VirtualSourceOperations",
7+
"preStop" : [],
98
"postStop" : [],
10-
"postRefresh" : [],
11-
"preRefresh" : [],
9+
"postRollback" : [],
1210
"postStart" : [],
13-
"configureClone" : []
11+
"preSnapshot" : [],
12+
"configureClone" : [],
13+
"postRefresh" : []
1414
}

0 commit comments

Comments
 (0)