delphix / dxtoolkit

Scripts that remotely interact with Delphix engine APIs
Apache License 2.0
38 stars 32 forks source link

"January 25th 2023: To add printing parent object for replicated vDBs in dx_get_hierarchy" #224

Open carloscuellar87d opened 1 year ago

carloscuellar87d commented 1 year ago

Expected Behavior When using dx_get_hierarchy , if you have VDB1 replicated from engine 1 to engine 2 and in engine 2, you create VDB2 from VDB1; you would expect that dx_get_hierarchy for engine2 will display that VDB2 was created from VDB1 as an additional column and not only the dSource where it originally came from.

Actual Behavior When using dx_get_hierarchy ,if you have VDB1 replicated from engine 1 to engine 2 and in engine 2, you create VDB2 from VDB1; you would expect that dx_get_hierarchy for engine2 will display that VDB2 was created from VDB1 as an additional column and not only the dSource where it originally came from.

For instance, this is an example where we created VDBREP2 from VDBTST1(replicated from a source engine) but it is only displayed that is original dsource came from another engine:

> ./dx_get_hierarchy -d dxcarloscd07.dcol2.delphix.com
> 
> Appliance  Database                       Group           Type     dSource                        dS time                             Physical DB                    First child DB
> ---------- ------------------------------ --------------- -------- ------------------------------ ----------------------------------- ------------------------------ ------------------------------
> dxcarloscd VDBREP2                        MSSQL VDBS 2    VDB      dSource on other DE            N/A                                 N/A                            N/A
> dxcarloscd VDBTST1@dxcarloscd7.dcol2-3    MSSQL VDBS@dxca VDB      dSource on other DE            N/A                                 N/A                            N/A
> dxcarloscd VDBREP1                        ORACLE VDBS 2   VDB      dSource on other DE            N/A                                 N/A                            N/A
> dxcarloscd VDBT1@dxcarloscd7.dcol2-1      ORACLE VDBS@dxc VDB      dSource on other DE            N/A                                 N/A                            N/A

Version Tested with latest dxtoolkit 2.4.17.2 and Delphix engine 7.0 and 6.0.17

pioro commented 1 year ago

Hi,

Carlos this is working as expected. The purpose of the dx_get_hierarchy is to display dSource and dSource snapshot plus a first VDB name. If you want to see only a VDB list you can use this dx_get_hierarchy -d Delphix33 -parent_engine Delphix32 -printhierarchy c2p or add a parent_engine parameter to see a real dSource.

Please let me know if this works for you.

Marcin