version 1.0; ns junos = "http://xml.juniper.net/junos/*/junos"; ns xnm = "http://xml.juniper.net/xnm/1.1/xnm"; ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0"; import "../import/junos.xsl"; var $arguments={ { "host"; "Enter the host ip address "; } { "interface"; "Enter the interface"; } } param $host; param $interface; match / { { var $configuration-change = { { { { { "block"; { "badhosts"; { $host; } { ; } } { "others"; { ; } } } } } } { { $interface; { "0"; { { { { "block"; } } } } } } } } var $connection = jcs:open(); var $results := { call jcs:load-configuration ( $connection,$configuration=$configuration-change) ; } if ( $results//xnm:error) { for-each ( $results//xnm:error) { message; } } var $close-results = jcs:close($connection); } }