Skip to main content
Delphix

Setting source.configTemplate in the CLI or API Script (KBA4511)

 

KBA

4511

Issue

Customer receives an error when using the config template name to set the source.ConfigTemplate when provisioning a VDB through the CLI or an API script. The error similar to the following:

source.configTemplate The provided string "VDB_TEMPLATE" is not a valid object reference.

The cause of the error is that beginning with 5.2.0.0, API 1.9.0, setting the source.ConfigTemplate now requires the config template reference instead of the config template name.

Applicable Delphix Versions

This article applies to the following versions of the Delphix Engine:

Major Release

Sub Releases

5.3 5.3.0.0
5.2 5.2.2.0, 5.2.2.1, 5.2.3.0, 5.2.4.0, 5.2.5.0, 5.2.5.1, 5.2.6.0, 5.2.6.1

Resolution

There are 2 ways around the issue. One involves the CLI. The other involves scripting the API.

CLI resolution:

When using the CLI an additional step to get the config template name reference is required. After getting that, source.ConfigTemplate can be set with the reference.

  1. Get the config template reference:

jenky5330.dc4> database/template
jenky5330.dc4 database template> ls
Objects
NAME           DESCRIPTION
test_template  -

Operations
create
config
jenky5330.dc4 database template> select test_template
jenky5330.dc4 database template 'test_template'> ls
Properties
    type: DatabaseTemplate
    name: test_template
    description: (unset)
    parameters:
        sga_target: 6000M
    reference: DATABASE_TEMPLATE-1
    sourceType: OracleVirtualSource
 

  1. Set 2.configTemplate to the template reference:

jenky5330.dc4 database provision *> set source.configTemplate=DATABASE_TEMPLATE-1
jenky5330.dc4 database provision *> edit source.configParams
jenky5330.dc4 database provision source.configParams *> back
jenky5330.dc4 database provision *>

 

API resolution:

When scripting the API, the API version can be set back to 1.8.2:

curl -s -X POST -k --data @- http://<engine name>/resources/json/delphix/session \
    -c cookies$$.txt -H "Content-Type: application/json" <<EOF
{
    "type": "APISession",
    "version": {
        "type": "APIVersion",
        "major": 1,
        "minor": 8,
        "micro": 2
    }
}
EOF