Delphix Products

Expand all | Collapse all

How to get dynamic container name for the particular VDB

Jump to Best Answer
  • 1.  How to get dynamic container name for the particular VDB

    Posted 06-09-2017 03:57:00 AM
    Hi Guys,

    Could you please tell us how to get the container name for that particular VDB.While we are working on the API we are searching the entire database code to get the list of container available.
    It is possible to get it or we can list out the detail of the selected VDB?

    Thanks

    Regards,
    Swathy


  • 2.  RE: How to get dynamic container name for the particular VDB
    Best Answer

    Posted 06-09-2017 10:07:00 AM
    Swathy, 

    When you create the VDB, it returns the container name in the response. If you need to grab the container name for a VDB at a different time, like in another job, then you would get the list of VDB's and use logic to grab the one for your name. In our github repo, you can leverage the find_obj_by_name class. For example: https://github.com/CloudSurgeon/delphixpy-examples/blob/master/dx_provision_vdb.py#L398

    Then your container reference is the reference of that object. 

    So in the example at that link, the following would print the container id:

    print vdb_obj.reference