install::xml::action::rename-instance (public)

 install::xml::action::rename-instance node

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

Change the instance name of an existing package (such as the main subsite). Either the url (if it's mounted) or package_id of the package may be given.

<rename-instance package-id="package-id" url="url" instance-name="new instance name" />

Parameters:
node (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_attribute_value apm_attribute_value (public) apm_package_rename apm_package_rename (public) apm_required_attribute_value apm_required_attribute_value (public) install::xml::util::get_id install::xml::util::get_id (public) site_node::get_from_url site_node::get_from_url (public) install::xml::action::rename-instance install::xml::action::rename-instance install::xml::action::rename-instance->apm_attribute_value install::xml::action::rename-instance->apm_package_rename install::xml::action::rename-instance->apm_required_attribute_value install::xml::action::rename-instance->install::xml::util::get_id install::xml::action::rename-instance->site_node::get_from_url

Testcases:
No testcase defined.
Source code:
    set package_id [apm_attribute_value -default "" $node package-id]
    set url [apm_attribute_value -default "" $node url]
    set instance_name [apm_required_attribute_value $node instance-name]

    if { $url ne "" && $package_id ne "" } {
        error "rename-instance specified with both url and package-id arguments"
    } elseif$package_id ne "" } {
        set package_id [install::xml::util::get_id $package_id]
        set url [lindex [site_node::get_url_from_object_id -object_id $package_id] 0]
    } else {
        array set site_node [site_node::get_from_url -url $url -exact]
        set package_id $site_node(object_id)
    }

    apm_package_rename -package_id $package_id -instance_name $instance_name

    return [list "Package mounted at \"$url\" renamed to \"$instance_name\""]
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: