def _validate_and_prepare(self, properties, arguments): prepared_args = {} host = arguments.get('host') Fail.fail_on_no_host(host) Fail.fail_on_invalid_host(host, properties) Fail.fail_on_blocked_hosts(host, properties) prepared_args['host'] = host environment = arguments.get('environment') default_environment = properties.get('default_environment') environment = Ora.nvl(environment, default_environment) Fail.fail_on_invalid_environment(environment, properties) prepared_args['environment'] = environment alias = arguments.get('alias') Fail.fail_on_invalid_alias(alias, properties) # if an alias is given, only this database will be installed, other databases will be # ignored. if alias: print("using alias: {}".format(alias)) prepared_args['databases'] = [alias] else: database = arguments.get('database') Fail.fail_on_invalid_database(database, properties) default_databases = properties.get('databases') databases = Ora.nvl(database, default_databases) prepared_args['databases'] = databases return prepared_args
def _validate_and_prepare(self, properties, arguments): prepared_args = {} host = arguments.get('host') Fail.fail_on_no_host(host) Fail.fail_on_invalid_host(host, properties) Fail.fail_on_blocked_hosts(host, properties) prepared_args['host'] = host environment = arguments.get('environment') default_environment = properties.get('default_environment') environment = Ora.nvl(environment, default_environment) Fail.fail_on_invalid_environment(environment, properties) prepared_args['environment'] = environment return prepared_args