4-24
User
Guide

for

the

Cisco

Application

Networking

Manager

5.2
OL-26572-01
Chapter
4






Using

Application

Template

Definitions
Managing
Application

Template

Definitions


Access
to

an
ACE
CLI

and

the

output

of

the
show
running

config

command

from

which

you

copy
the
commands

that

you

need

and

paste

them

into

the

template.
Procedure
Step
1
From
the

ACE

CLI,

en

ter

t

he
show
running

config

command.
Step
2
Create
a

folder

in

which

to

work

while

creating

a

template

and

place

the

application
template
definition
XML
schema

file

in

it.
Step
3
Using
a

text

editor

or

XML

editor,

create

an

XML

template

file,
save
it

to

your

work

folder,

and

copy

in
the
following

base

code:
<?xml
version="1.0"

encoding="UTF-8"?>
<template
xmlns:xalan="http://xml.apache.org/xslt"

applicationType="app_name"
version="1.0"
xsi:noNamespaceSchemaLocation="file:application_template_v2.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
description="desc"
showsInGuidedSetup="true">
<input>




<group

name="service"

type="group"

displayString="ACE

Configuration">






<variable

displayString="Template

Instance

Name"

name="name"

type="name"></variable>






<variable

name="vc"

type="device"

displayString="ACE

Virtual

Context"/>




</group>


</input>


<config

device="{$vc}">




<freeform></freeform>


</config>
</template>
Step
4
Do
the

following

(shown

in
bold
text

in
the
example):
a.
Assign
values

t

o
the
application

t

ype

and
provide
a
bri

ef

description.
b.
Within
the
input

tags,

add
the
required

variable

t

ags.
c.
Within
the
free
form

tags,

paste

the

required
ACE
CLI

commands

that
you
copy

from

the
show
running
config

command

output.
In
the

following

example,

the

modified

code

is

shown

in

bold

text:
<?xml
version="1.0"

encoding="UTF-8"?>
<template
xmlns:xalan="http://xml.apache.org/xslt"

applicationType="Init_VC"

version="1.0"
xsi:noNamespaceSchemaLocation="file:application_template_v2.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
description="Initialize

a

new
Virtual
Context"

showsInGuidedSetup="true">
<input>




<group

name="service"

type="group"

displayString="ACE

Configuration">






<variable

displayString="Template

Instance

Name"

name="name"

type="name"></variable>






<variable

name="vc"

type="device"

displayString="ACE

Virtual

Context:"/>






<variable

name="motd"

type="other"

displayString="Message

of

the

Day

(use

^|

as
newline):"
default="Warning!

^|

This

is

a

secure

system








do

not

use."/>






<variable

name="syslog"

type="ipaddress"

displayString="Syslog

Server:"/>






<variable

name="traphost"

type="ipaddress"

displayString="SNMP

Trap

Host:"/>






<variable

name="community"

type="string"

displayString="SNMP

Community

String"
default="public"/>




</group>


</input>


<config

device="{$vc}">




<freeform>banner

motd

#{$motd}#
logging
host

{$syslog}
logging
enable
snmp-server
host

{$traphost}

traps

{$community}
snmp-server
enable

traps