zowe / zowe-cli

Zowe CLI
Eclipse Public License 2.0
108 stars 85 forks source link

Zowe config auto-init with default values from profile definition #2164

Open sosadchuk opened 1 month ago

sosadchuk commented 1 month ago

Hi Zowe CLI team,

I wanted to request an enhancement to the auto-init feature: make newly created profiles use defaults from the profile definition.

Currently, after invoking config auto-init, I get a profile like the following:

"bcmdbmdsz": {
    "type": "dbm-db2",
    "properties": {
        "basePath": "/bcmdbmdsz/api/v1"
    }
},

This profile is not ready to be used due to missing CLI plugin-specific properties, and requires manual edits.

However when I use just config init, the dbm-db2 profile is created with defaults:

"dbm-db2": {
    "type": "dbm-db2",
    "properties": {
        "port": 7300,
        "environmentList": {
            "ssid1": "env1@host1:port1",
            "ssid2": "env2@host2:port2"
        },
        "workDatasetPrefix": "${user}.dbmdb2",
        "deleteWorkDatasets": true,
        "overwriteOutputFiles": false,
        "authid": "${user}",
        "sqlid": "${user}",
        "terminationCharacter": ";"
    },
    "secure": [
        "user",
        "password"
    ]
},

What would really be great - is to get is a profile using both information from API ML, and the defaults coming from the profile definition (and I believe the port property has to be removed along with the secure node because this data should be used from the base profile with API ML host, port, and credentials):

"dbm-db2": {
    "type": "dbm-db2",
    "properties": {
        "basePath": "/bcmdbmdsz/api/v1"
        "environmentList": {
            "ssid1": "env1@host1:port1",
            "ssid2": "env2@host2:port2"
        },
        "workDatasetPrefix": "${user}.dbmdb2",
        "deleteWorkDatasets": true,
        "overwriteOutputFiles": false,
        "authid": "${user}",
        "sqlid": "${user}",
        "terminationCharacter": ";"
    }
},

Thanks, Sergei.

github-actions[bot] commented 1 month ago

Thank you for raising this enhancement request. The community has 90 days to vote on it. If the enhancement receives at least 5 upvotes, it is added to our development backlog. If it receives fewer votes, the issue is closed.