To specify a default Operational Data Model (ODM) specification file other than the built-in specification file for XML-formatted requests, use the
formatglobal command in global configuration mode. To remove the default file, use the
no form of this command.
formatgloballocation:local-filename
noformatglobal
Syntax Description
location:local-filename
Command ODM file location and filename. Valid locations are
bootflash:,flash:,nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
ODM spec files have a .odm suffix.
Command Default
The built-in spec file is used.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
Use the
format global
command to specify an ODM spec file as the default for all XML-formatted requests coming from NETCONF operations. The NETCONF file search precedence is to look first for the file associated by the
netconfformat command, then for the file defined by the
formatglobal command, and finally for the built-in spec file.
The ODM spec file must exist on the files ystem before NETCONF can be configured to use it. If the file does not exist, the
formatglobal command is rejected.
Examples
The following example shows how to define a default ODM file to be used for all requests, then associates that file with NETCONF for all XML-formatted requests. If no file is specified, the built-in spec file is used for all requests:
Router(config)# format global disk0:spec3.3.odm
Router(config)# netconf format disk2:spec3.3.odm
Related Commands
Command
Description
netconfformat
Associates NETCONF with an ODM spec file for XML-formatted requests.
spec-fileinstallbuilt-in
Replaces the current spec file with the built-in spec file.
spec-fileinstallfile
Replaces a local spec file with a remote spec file.
netconf format
To associate Network Configuration Protocol (NETCONF) with an Operational Data Model (ODM) specification file for XML-formatted requests, use the
netconfformat command in global configuration mode. To remove the association, use the
no form of this command.
netconfformatlocation:local-filename
nonetconfformat
Syntax Description
location:local-filename
Command ODM file location and filename. Valid locations are
bootflash:,
flash:,
nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
ODM spec files have a .odm suffix.
Command Default
The spec file defined by the
formatglobal command is used.
Command Modes
Global configuration (config)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
Use the
netconf format command to make an association with NETCONF to use the specified ODM spec file for all XML-formatted requests coming from NETCONF operations.
The ODM spec file must exist on the files ystem before NETCONF can be configured to use it. If the file does not exist, the
netconfformat command is rejected.
Examples
The following example shows how to associate a file named spec3.3.odm with NETCONF:
Router(config)# netconf format disk0:spec3.3.odm
Related Commands
Command
Description
netconflock-time
Limits the amount of time NETCONF can lock a configuration.
netconfmax-sessions
Limits the total number of NETCONF sessions.
netconfssh
Enables NETCONF over SSHv2.
show format
To display a fully expanded list of commands that have a spec file entry (SFE), display the SFE of a specific command, or validate a specific spec file, use the
showformat command in privileged EXEC mode.
(Optional) Displays the commands with SFEs in the built-in spec file, and validates the built-in spec file when used with the
validate keyword. Displays the SFE for a specific command when used with the
cli keyword and
command argument.
location:local-filename
(Optional) Command Operational Data Model (ODM) spec file location and filename. Valid locations are
bootflash:,flash:,
nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
ODM spec files have a .odm suffix. The pipe (|) output modifier can be used in the command.
Note
These arguments are not required if you want to use a default ODM file defined with the
formatglobal command.
cli
command
(Optional) Displays only the SFE for the specified command. Enter a fully expanded command name.
validate
(Optional) Validates the built-in spec file or a specific spec file.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was modified. The
built-in and
validate keywords were added.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
Use the
show format command to display an index of commands that have an SFE in the spec file, display the SFE of a specific command, or validate a spec file. The SFE of any command is in XML format.
Use the
show format command to display an index of commands with an SFE in the current spec file. Some commands have an SFE in the built-in spec file of the image. Use the
show format built-in command to display an index of the commands with an SFE in the built-in spec file.
To display the SFE for a specific command in the built-in spec file, use the
show format built-in clicommand command. For example, if
show inventory is present in the built-in spec file, then the
show format built-in cli show inventory command will display the spec entry for this CLI. To display the SFE for a specific command in a specific spec file, use the
show formatlocation:local-filenameclicommand command.
To validate the built-in spec file use the
show format built-in validate command. To validate a specific spec file use the show formatlocation:local-filenamevalidate command.
Examples
The following example displays the list of commands that have SFEs in the built-in spec file of the image:
Router# show format built-in
The following CLI are supported in built-in
show inventory
show ip interface brief
The following example shows a list of fully expanded command names that have spec files in the spec3.3.odm file. A message is attached that lists an incorrectly defined command.
Router# show format slot0:spec3.3.odm
The following CLI are supported in slot0:spec3.3.odm
show arp
show bootvar
show cdp neighbors detail
show context
show flash:
show interfaces*
show interfaces
show inventory
show ip interface*
show ip interface brief
show ip nat translations
show line value
show line
show processes memory
show region
show spanning-tree
show stacks
The following CLI are IGNORED (incorrectly entered) in slot0:spec3.3.odm
show async status
The following example shows the output when the spec entry for a particular command is requested from the default ODM file:
The following example validates the built-in spec file:
Router# show format built-in validate
The file built-in has been validated
The following example shows the output when a spec file fails to validate:
Router# show format disk2:/spec3.4.odm validate
The following problem was detected in disk2:/spec3.4.odm bad format in the spec file, show line value
The following example shows the output when a specific spec file is validated:
Router# show format disk2:/spec3.user1.odm validate
The file disk2:/spec3.user1.odm has been validated
The following example specifies the spec file named spec3.user2.odm as the default spec file instead of the built-in spec file, replaces the current spec file with it, and ensures that it is validated as the current spec file:
Router(config)# format global disk2:/spec3.user2.odm
Router(config)# exit
Router# spec-file install disk2:/spec3.user2.odm built-in
Replace existing file? [yes]: Enter
Router#
Router# show format validate
The file disk2:/spec3.user2.odm has been validated
Each display from the
show format command is self-explanatory; see the "Usage Guidelines" section for more information.
Related Commands
Command
Description
format global
Specifies a default ODM spec file other than the built-in spec file.
showodm-format
Displays the schema of the spec file.
showxsd-format
Generates XSD output for a command.
spec-file install built-in
Replaces the current spec file with the built-in spec file.
show odm-format
To display the schema of the spec file, use the
showodm-format command in privileged EXEC mode.
showodm-format
Syntax Description
This command has no arguments or keywords.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
The
showodm-format command displays the spec file structure in a fixed output that you can refer to in order to understand the spec file tag hierarchy.
Examples
The following example shows the fixed output from the
showodm-format command:
Router# show odm-format
New Name Space ''
<NotARealTag> Either 0 or 1 allowed
<ODMSpec> Exactly 1 required
<Command> Exactly 1 required
<Name> Exactly 1 required
<AliasSet> Either 0 or 1 allowed
<Alias> At least 1 required
<OS> Either 0 or 1 allowed
<DataModel> Exactly 1 required
<Container> Exactly 1 required
<Table> 0 or more is allowed
<Header> At least 1 required
<Option> 0 or more is allowed
<EndOfTheTable> Either 0 or 1 allowed
<Property> 0 or more is allowed
<Option> 0 or more is allowed
<Container> 0 or more is allowed
<Table> 0 or more is allowed
<Header> At least 1 required
<Option> 0 or more is allowed
<EndOfTheTable> Either 0 or 1 allowed
<Property> 0 or more is allowed
<Option> 0 or more is allowed
<Container> 0 or more is allowed
<Legends> 0 or more is allowed
<Legend> At least 1 required
<IgnorableLinesList> 0 or more is allowed
<Line> At least 1 required
<Legends> 0 or more is allowed
<Legend> At least 1 required
<IgnorableLinesList> 0 or more is allowed
<Line> At least 1 required
The output from the
showodm-format command is self-explanatory; see the "Usage Guidelines" section for more information.
Related Commands
Command
Description
showxsd-format
Generates XSD output for a command.
show xsd-format
To generate XML Schema Definition (XSD) output for a command, use the
showxsd-format command in privileged EXEC mode.
showxsd-format[location:local-filename]clicommand
Syntax Description
location:local-filename
(Optional) Command Operational Data Model (ODM) file location and filename. Valid locations are
bootflash:,flash:,nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
ODM spec files have a .odm suffix. The pipe (|) output modifier can be used in the command.
Note
These arguments are not required if you want to use a default ODM file defined with the
formatglobal command.
clicommand
Displays the XSD output for the specific command. Enter a fully expanded command name.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
The
showxsd-format command searches through the ODM spec file to find a match for the specified command name and generates XSD format. The spec file must exist on the local file system. If no spec entry is found, an error is returned.
Note
The
showrunning-config command output is generated natively in XML, so the spec filename could be an empty file or, if a default spec file has been defined with the
formatglobal command, no filename is required.
Examples
The following example displays the XSD generated for the
showarp command:
The output from the
showxsd-format command is self-explanatory; see the "Usage Guidelines" section for more information.
Related Commands
Command
Description
format global
Specifies a default ODM spec file other than the built-in spec file for XML-formatted requests coming from NETCONF operations.
showodm-format
Displays the schema of the spec file.
spec-file install add-entry
To copy a spec file entry (SFE) from a remote location and add it to the local spec file, use the
spec-fileinstalladd-entry command in privileged EXEC mode.
Spec filename, which must be on a local file system. Valid locations are
bootflash:,flash:,nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
Spec files have a .odm suffix.
You will be prompted to confirm adding the SFE, unless the optional
force keyword is used.
url:remote-filename
Location (URL) and filename of the remote spec file. Valid URLs are
archive:,
bootflash:,
cns:,
flash:,
ftp:,
http:,
null:,
nvram:,
pram:,
rcp:,
scp:,
system:,
tar:,
tftp:,
tmpsys:, and any valid disk or slot number (such as
disk0: or
slot1:).
command
Command SFE to be added to the spec file.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
Use the
spec-fileinstalladd-entry command to add an SFE to a spec file. A check is performed on the loaded SFE to ensure that the command is not already present in the spec file, and that the SFE can be parsed correctly in XML.
If the spec file does not exist, you will be prompted before the file is created. If the command SFE already exists in the spec file, you will be prompted before the command SFE is replaced. A backup copy of the local spec file is created before the remote SFE is added.
Examples
The following example adds the
showarp command SFE from the remote show_arp.odm file at location "tftp://system1/user1" to the local file:
Router# spec-file install slot0:spec_file.odmadd-entry tftp://system1/user1/show_arp.odm show arp
Unless you add the
force keyword to the command string, you will be prompted as follows:
create new spec file? [yes]:
CLI exists, delete it? [yes]:
Pressing the
Enter key is the same as typing
yes. Type
no and press
Enter to stop either process.
Related Commands
Command
Description
spec-fileinstallbuilt-in
Replaces the current spec file with the built-in spec file.
spec-fileinstallfile
Replaces a local spec file with a remote spec file.
spec-fileinstallremove-entry
Removes an SFE from a spec file.
spec-fileinstallrestore
Restores a spec file to its previous contents using a backup file.
spec-file install built-in
To replace the current spec file with the built-in spec file, use the
spec-fileinstallbuilt-in command in privileged EXEC mode.
Spec filename, which must be on a local file system. Valid locations are
bootflash:,flash:,nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
Spec files have a .odm suffix.
If
local-filename exists, you will be prompted for a yes or no response before the file is replaced, unless the optional
force keyword is used.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
Use the
spec-fileinstallbuilt-in to replace the current spec file with the built-in spec file. You will be prompted before the current file is replaced and
filename.bak will be created.
Examples
The following example shows how to start the process to replace the current spec file with the built-in spec file:
Unless you add the
force keyword to the command string, you will be prompted as follows:
Replace existing file? [yes]:
Press the
Enter key to make a backup copy of the current file and then replace it with the built-in spec file. Type
no and press
Enter to stop the process.
Related Commands
Command
Description
spec-fileinstalladd-entry
Copies an SFE from a remote location and adds it to a local spec file.
spec-fileinstallfile
Replaces a local spec file with a remote spec file.
spec-fileinstallremove-entry
Removes an SFE from a spec file.
spec-fileinstallrestore
Restores a spec file to its previous contents using a backup file.
spec-file install file
To replace a local spec file with a remote spec file, use the
spec-fileinstallfile command in privileged EXEC mode.
Spec filename, which must be on a local file system. Valid locations are
bootflash:,flash:,nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
Spec files have a .odm suffix.
When
local-filename exists, you will be prompted for a yes or no response before the file is copied, unless the optional
force keyword is used.
url:remote-filename
Location (URL) and filename of the remote spec file. Valid URLs are
archive:,
bootflash:,
cns:,
flash:,
ftp:,
http:,
null:,
nvram:,
pram:,
rcp:,
scp:,
system:,
tar:,
tftp:,
tmpsys:, and any valid disk or slot number (such as
disk0: or
slot1:).
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
Use the
spec-file install file command to copy a remote spec file to a local spec file. A check of the loaded file is performed to ensure that each specified command is included only once, and that the spec file entry (SFE) can be parsed correctly in XML.
Examples
The following example shows how to copy a remote spec file on "tftp://system1/user1" to the local file:
Spec filename, which must be on a local file system. Valid locations are
bootflash:,flash:,nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
Spec files have a .odm suffix.
command
Command SFE to be removed from the spec file.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
Use the
spec-fileinstallremove-entry command to remove a command SFE from a spec file. A check is performed to ensure that the command SFE is present in the spec file. If the spec file does not exist, this command fails. A backup copy of the spec file is created before the SFE is removed.
Examples
The following example shows how to remove the
showarp command SFE from the remote show_arp.odm file to the local spec_file.odm file:
Router# spec-file install slot0:spec_file.odm remove-entry show arp
Related Commands
Command
Description
spec-fileinstalladd-entry
Copies an SFE from a remote location and adds it to a local spec file.
spec-fileinstallbuilt-in
Replaces the current spec file with the built-in spec file.
spec-fileinstallfile
Replaces a local spec file with a remote spec file.
spec-fileinstallrestore
Restores a spec file to its previous contents using a backup file.
spec-file install restore
To restore a spec file to its previous contents using a backup file, use the
spec-fileinstallrestore command in privileged EXEC mode.
Spec filename, which must be on a local file system. Valid locations are
bootflash:,flash:,nvram:, and any valid disk or slot number (such as
disk0: or
slot1:).
Spec files have a .odm suffix.
Command Modes
Privileged EXEC (#)
Command History
Release
Modification
12.4(20)T
This command was introduced.
12.2(33)SRE
This command was integrated into Cisco IOS Release 12.2(33)SRE.
12.2(54)SG
This command was integrated into Cisco IOS Release 12.2(54)SG.
12.2(50)SY
This command was integrated into Cisco IOS Release 12.2(50)SY.
15.1(1)SY
This command was integrated into Cisco IOS Release 15.1(1)SY.
Usage Guidelines
Use the
spec-fileinstallrestore command to revert a spec file to its original contents using a backup (.bak) file. If the .bak file does not exist, this command fails.
Examples
The following example shows how to restore the spec file using the backup file: