Skip to content

Commit 6d15c35

Browse files
author
Marcin Przepiorowski
committed
staging push snapshot support
1 parent 5482fd1 commit 6d15c35

File tree

2 files changed

+23
-5
lines changed

2 files changed

+23
-5
lines changed

lib/OracleVDB_obj.pm

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,9 +1669,17 @@ sub snapshot
16691669
);
16701670
} else {
16711671
# Delphix 6.0
1672-
%snapshot_type = (
1673-
"type" => "OracleSyncFromExternalParameters"
1674-
);
1672+
1673+
1674+
if ($self->getStagingPush() eq 'yes') {
1675+
%snapshot_type = (
1676+
"type" => "OracleStagingPushSyncParameters"
1677+
);
1678+
} else {
1679+
%snapshot_type = (
1680+
"type" => "OracleSyncFromExternalParameters"
1681+
);
1682+
}
16751683
}
16761684

16771685
if (defined($full)) {
@@ -2353,6 +2361,16 @@ sub addSource {
23532361
} else {
23542362
# staging push
23552363

2364+
my $sourcingpolicy_type;
2365+
if (version->parse($self->{_dlpxObject}->getApi()) < version->parse(1.11.23)) {
2366+
# until and including 11
2367+
$sourcingpolicy_type = "OracleSourcingPolicy";
2368+
} else {
2369+
# from 12
2370+
$sourcingpolicy_type = "OracleStagingSourcingPolicy";
2371+
}
2372+
2373+
23562374
if (!defined($source)) {
23572375
$source = $dsource_name;
23582376
}
@@ -2394,7 +2412,7 @@ sub addSource {
23942412
"databaseName" => $source,
23952413
"allowAutoStagingRestartOnHostReboot" => JSON::true,
23962414
"sourcingPolicy" => {
2397-
"type" => "OracleSourcingPolicy",
2415+
"type" => $sourcingpolicy_type,
23982416
"logsyncEnabled" => $logsync_param
23992417
},
24002418
"syncStrategy" => {

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.19.2';
32+
our $version = '2.4.20';
3333

3434
my $tz = new Date::Manip::TZ;
3535
my $dt = new Date::Manip::Date;

0 commit comments

Comments
 (0)