API/Python/Open-Source Solutions

Expand all | Collapse all

Error while running dx_provision_vdb.py

  • 1.  Error while running dx_provision_vdb.py

    Posted 05-23-2017 09:16:00 PM
    Hi,

    I am getting following error while running dx_provision_db.py :

    RequestError: APIError(action=u'Change the API version to one supported by your version of the Delphix Engine. Review the Release Notes for your Delphix Engine version to determine which API version is supported.', command_output=None, details=u'Invalid API version "1.8.2".', diagnoses=[], id=u'exception.webservices.session.invalid.version', type=u'APIError')

    Please advise.

    Thanks
    Yogesh



  • 2.  RE: Error while running dx_provision_vdb.py

    Posted 05-24-2017 05:30:00 AM
    Delphix Engines expose an API which is versioned, you can find the most recent API version supported for each release in the documentation https://docs.delphix.com/docs/reference/web-service-api-guide/api-version-information.

    For instance if you are running a Delphix Engine version 5.1.0.0, it will support all API versions until 1.8.0 but not higher.

    This error message indicates that the script you are using (dx_provision_db.py) is trying to connect to your Delphix Engine using API version 1.8.2 which your Engine does not support.

    I believe the API version is linked to the version of delphixpy you are using. Did you install delphix py with the following command?

    pip install delphixpy


  • 3.  RE: Error while running dx_provision_vdb.py

    Posted 05-24-2017 08:30:00 PM
    Hi Eyal,

    I did not use the command for installing delphixpy module.

    But when I tried pip install delphixpy i got following output:

    Requirement already satisfied: delphixpy in ./landshark/lib/python2.7/site-packages

    The engine version is 5.1.4.0 and supporting API version should be 1.8.1.

    Could you please tell me how to remove 1.8.2 and install 1.8.1.

    Thanks
    Yogesh




  • 4.  RE: Error while running dx_provision_vdb.py

    Posted 05-25-2017 05:45:00 AM
    Yogesh,

    You can force the version number by specifying it in the import statements of the script, like so:
    existing block
    from delphixpy.delphix_engine import DelphixEngine
    from delphixpy.exceptions import HttpError
    from delphixpy.exceptions import JobError
    from delphixpy.exceptions import RequestError
    from delphixpy import job_context
    from delphixpy.web import database
    from delphixpy.web import environment
    from delphixpy.web import group
    from delphixpy.web import host
    from delphixpy.web import job
    from delphixpy.web import repository
    from delphixpy.web import snapshot
    from delphixpy.web import source
    from delphixpy.web import sourceconfig
    from delphixpy.web import user
    from delphixpy.web.database import template
    from delphixpy.web.vo import VirtualSourceOperations
    from delphixpy.web.vo import OracleDatabaseContainer
    from delphixpy.web.vo import OracleInstance
    from delphixpy.web.vo import OracleProvisionParameters
    from delphixpy.web.vo import OracleSIConfig
    from delphixpy.web.vo import OracleVirtualSource
    from delphixpy.web.vo import TimeflowPointLocation
    from delphixpy.web.vo import TimeflowPointSemantic
    from delphixpy.web.vo import TimeflowPointTimestamp
    from delphixpy.web.vo import ASEDBContainer
    from delphixpy.web.vo import ASEInstanceConfig
    from delphixpy.web.vo import ASEProvisionParameters
    from delphixpy.web.vo import ASESIConfig
    from delphixpy.web.vo import ASEVirtualSource
    from delphixpy.web.vo import MSSqlProvisionParameters
    from delphixpy.web.vo import MSSqlDatabaseContainer
    from delphixpy.web.vo import MSSqlVirtualSource
    from delphixpy.web.vo import MSSqlInstance
    from delphixpy.web.vo import MSSqlSIConfig
    from delphixpy.web.vo import AppDataVirtualSource
    from delphixpy.web.vo import AppDataProvisionParameters
    from delphixpy.web.vo import AppDataDirectSourceConfig

    new block:
    from delphixpy.v1_8_1.delphix_engine import DelphixEngine
    from delphixpy.v1_8_1.exceptions import HttpError
    from delphixpy.v1_8_1.exceptions import JobError
    from delphixpy.v1_8_1.exceptions import RequestError
    from delphixpy.v1_8_1 import job_context
    from delphixpyv.1_8_1.web import database
    from delphixpy.v1_8_1.web import environment
    from delphixpy.v1_8_1.web import group
    from delphixpy.v1_8_1.web import host
    from delphixpy.v1_8_1.web import job
    from delphixpy.v1_8_1.web import repository
    from delphixpy.v1_8_1.web import snapshot
    from delphixpy.v1_8_1.web import source
    from delphixpy.v1_8_1.web import sourceconfig
    from delphixpy.v1_8_1.web import user
    from delphixpy.v1_8_1.web.database import template
    from delphixpy.v1_8_1.web.vo import VirtualSourceOperations
    from delphixpy.v1_8_1.web.vo import OracleDatabaseContainer
    from delphixpy.v1_8_1.web.vo import OracleInstance
    from delphixpy.v1_8_1.web.vo import OracleProvisionParameters
    from delphixpy.v1_8_1.web.vo import OracleSIConfig
    from delphixpy.v1_8_1.web.vo import OracleVirtualSource
    from delphixpy.v1_8_1.web.vo import TimeflowPointLocation
    from delphixpy.v1_8_1.web.vo import TimeflowPointSemantic
    from delphixpy.v1_8_1.web.vo import TimeflowPointTimestamp
    from delphixpy.v1_8_1.web.vo import ASEDBContainer
    from delphixpy.v1_8_1.web.vo import ASEInstanceConfig
    from delphixpy.v1_8_1.web.vo import ASEProvisionParameters
    from delphixpy.v1_8_1.web.vo import ASESIConfig
    from delphixpy.v1_8_1.web.vo import ASEVirtualSource
    from delphixpy.v1_8_1.web.vo import MSSqlProvisionParameters
    from delphixpy.v1_8_1.web.vo import MSSqlDatabaseContainer
    from delphixpy.v1_8_1.web.vo import MSSqlVirtualSource
    from delphixpy.v1_8_1.web.vo import MSSqlInstance
    from delphixpy.v1_8_1.web.vo import MSSqlSIConfig
    from delphixpy.v1_8_1.web.vo import AppDataVirtualSource
    from delphixpy.v1_8_1.web.vo import AppDataProvisionParameters
    from delphixpy.v1_8_1.web.vo import AppDataDirectSourceConfig



  • 5.  RE: Error while running dx_provision_vdb.py

    Posted 05-29-2017 08:30:00 PM
    Hi Adam,

    I forced the version to 1.8.1 and got following error.
    ----
    File "/home/delphix/landshark/lib/python2.7/site-packages/delphixpy/v1_8_1/web/group/group.py", line 67, in get_all
        assert API_VERSION == engine.API_VERSION, "Wrong API version (%s) for parameter 'engine' (%s)" % (API_VERSION, engine.API_VERSION)
    AssertionError: Wrong API version (1.8.1) for parameter 'engine' (1.8.2)
    -----

    I am trying to setup and experiment Delphix Python module and using the default trial setup that has got API version as 1.8.1 and Engine version 5.1.4.0. 

    I am not able to understand why in case of 1.8.1 I am still getting error.

    Please advise.
    Thanks
    Yogesh