apm_parameter_register (public)

 apm_parameter_register [ -callback callback ] \
    [ -parameter_id parameter_id ] [ -scope scope ] parameter_name \
    description package_key default_value datatype [ section_name ] \
    [ min_n_values ] [ max_n_values ]

Defined in packages/acs-tcl/tcl/apm-procs.tcl

Register a parameter in the system. The new "scope" parameter is named rather than positional to avoid breaking existing code.

Switches:
-callback (optional, defaults to "apm_dummy_callback")
-parameter_id (optional)
-scope (optional, defaults to "instance")
Parameters:
parameter_name (required)
description (required)
package_key (required)
default_value (required)
datatype (required)
section_name (optional)
min_n_values (optional, defaults to "1")
max_n_values (optional, defaults to "1")
Returns:
The parameter id of the new parameter.

Partial Call Graph (max 5 caller/called nodes):
%3 test_parameter__check_procs parameter__check_procs (test acs-tcl) apm_parameter_register apm_parameter_register test_parameter__check_procs->apm_parameter_register test_parameter_register_test parameter_register_test (test acs-tcl) test_parameter_register_test->apm_parameter_register test_test_apm_parameter__register test_apm_parameter__register (test acs-tcl) test_test_apm_parameter__register->apm_parameter_register apm_copy_param_to_descendents apm_copy_param_to_descendents (public) apm_parameter_register->apm_copy_param_to_descendents db_exec_plsql db_exec_plsql (public) apm_parameter_register->db_exec_plsql acs_admin::check_expired_certificates acs_admin::check_expired_certificates (private) acs_admin::check_expired_certificates->apm_parameter_register apm_package_install_parameters apm_package_install_parameters (private) apm_package_install_parameters->apm_parameter_register apm_package_upgrade_parameters apm_package_upgrade_parameters (private) apm_package_upgrade_parameters->apm_parameter_register boomerang::after-install boomerang::after-install (private) boomerang::after-install->apm_parameter_register cookieconsent::after-install cookieconsent::after-install (private) cookieconsent::after-install->apm_parameter_register

Testcases:
test_apm_parameter__register, parameter_register_test, parameter__check_procs
Source code:
    ns_log debug "apm_parameter_register: Registering $parameter_name$section_name$default_value"

    set parameter_id [db_exec_plsql parameter_register {}]

    # Propagate to descendents if it's an instance parameter.

    if { $scope eq "instance" } {
        apm_copy_param_to_descendents $package_key $parameter_name
    }

    return $parameter_id
Generic XQL file:
packages/acs-tcl/tcl/apm-procs.xql

PostgreSQL XQL file:
<fullquery name="apm_parameter_register.parameter_register">
    <querytext>

	    select apm__register_parameter(
					 :parameter_id,
					 :package_key,
					 :parameter_name,
					 :description,
                                         :scope,
					 :datatype,
					 :default_value,
					 :section_name,
					 :min_n_values,
					 :max_n_values
	                                );

      </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-procs-postgresql.xql

Oracle XQL file:
<fullquery name="apm_parameter_register.parameter_register">
    <querytext>

	    begin
	    :1 := apm.register_parameter(
					 parameter_id => :parameter_id,
					 package_key => :package_key,
					 parameter_name => :parameter_name,
					 description => :description,
                                         scope => :scope,
					 datatype => :datatype,
					 default_value => :default_value,
					 section_name => :section_name,
					 min_n_values => :min_n_values,
					 max_n_values => :max_n_values
	                                );
	    end;

      </querytext>
</fullquery>
packages/acs-tcl/tcl/apm-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: