Commvault / cvpysdk

Developer SDK - Python
https://commvault.github.io/cvpysdk/
Apache License 2.0
54 stars 41 forks source link

add oracle instance #156

Closed abadrilov closed 2 years ago

abadrilov commented 2 years ago

Hello. Could you tell me how work the method add_oracle_instance?

I have code:

vars:

db_name: str = "X"
oracle_config: dict = {
    "log_storage_policy": "SP_logs",
    "cmdline_storage_policy": "DB_X",
    "oracle_user_name": "backup",
    "oracle_home": "/oramnt/X_oh12",
    "connect_string": {
        "username": "test",
        "password": "test",
        "service_name": "X",
    },
}

source_server: list = "db01"

func

def create_instance(commcell, name, server_name, config):
  client_get = Clients(commcell).get(server_name)
  ag_get = Agents(client_get).get("oracle")
  Instances(ag_get).add_oracle_instance(name, oracle_options=oracle_config)

When I run the code, I got the erros: cvpysdk.exception.SDKException: Required option: oracle_user_name is missing, Please provide all parameters:

I do not understand, the option "oracle_user_name" specified into oracle_config. What could be the problem?