install::xml::object_id::package (public)

 install::xml::object_id::package node

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

Returns an object_id for a package specified in node. The node name is ignored so any node which provides the correct attributes may be used.

<package [ id="id" | key="package-key" | url="package-url" ] />

Parameters:
node (required)

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

    set package_key [apm_attribute_value -default "" $node package-key]
    if {$package_key eq ""} {
        set package_key [apm_attribute_value -default "" $node package]
    }

    # Remove double slashes
    regsub -all -- {//} $url "/" url

    if { $package_key ne "" && $url ne "" } {
        error "set-parameter: Can't specify both package and url for $url and $package_key"

    } elseif$id ne "" } {
        if {[string is integer $id]} {
            return $id
        } else {
            return [install::xml::util::get_id $id]
        }
    } elseif$package_key ne "" } {
        return [apm_package_ids_from_key -package_key $package_key]

    } else {
        return [site_node::get_object_id  -node_id [site_node::get_node_id -url $url]]
    }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: