site_node_apm_integration::delete_site_nodes_and_package (public)

 site_node_apm_integration::delete_site_nodes_and_package \
    -package_id package_id

Defined in packages/acs-tcl/tcl/site-node-apm-integration-procs.tcl

First deletes ALL the site nodes this instance is mapped to, then deletes the instance.

Switches:
-package_id (required)

Partial Call Graph (max 5 caller/called nodes):
%3 apm_package_instance_delete apm_package_instance_delete (public) db_transaction db_transaction (public) site_node::delete site_node::delete (public) site_node::get_all_from_object_id site_node::get_all_from_object_id (public) site_node::unmount site_node::unmount (public) site_node_apm_integration::delete_site_nodes_and_package site_node_apm_integration::delete_site_nodes_and_package site_node_apm_integration::delete_site_nodes_and_package->apm_package_instance_delete site_node_apm_integration::delete_site_nodes_and_package->db_transaction site_node_apm_integration::delete_site_nodes_and_package->site_node::delete site_node_apm_integration::delete_site_nodes_and_package->site_node::get_all_from_object_id site_node_apm_integration::delete_site_nodes_and_package->site_node::unmount

Testcases:
No testcase defined.
Source code:
        db_transaction {
            # should here be a pre-destruction proc like the post instantiation proc?
            foreach site_node_info_list [site_node::get_all_from_object_id -object_id $package_id] {

                ns_log debug "delete_site_nodes_and_package: $site_node_info_list"

                array set site_node $site_node_info_list

                site_node::unmount -node_id $site_node(node_id)
                site_node::delete -node_id $site_node(node_id)
                site_node::update_cache -node_id $site_node(node_id)
            }

            apm_package_instance_delete $package_id
        }
XQL Not present:
PostgreSQL, Oracle
Generic XQL file:
packages/acs-tcl/tcl/site-node-apm-integration-procs.xql

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