Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Community Member

Multi-line command problems

I am trying to add an motd banner to a configuration template in template center.  When I add it I get the following error on the import:

Template import Failed. Unable to parse the XML file.Please ensure that the XML file is complaint to the schema.

I went to the config manual and copied the multi-line command example exactly as shown and added it to my template:

<MLTCMD> banner login "Welcome to

Cisco Prime LMS - you are using

Multi-line commands" </MLTCMD>

I still get the import error.  I have never been able to get multi-line commands to work in any version of LMS.  Is this a known issue?  Is there a fix?

-Jeff

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Multi-line command problems

Sorry for the delay.  I have been playing catch up since returning from CiscoLive!.  I found the bug.  The variable expansion was not being done on the full multi-line command.  I have a working patch in my lab.  If you open a TAC service request using the Open TAC Service Request link in the actions panel of this thread, your engineer can contact me for the patch.

10 REPLIES
Cisco Employee

Multi-line command problems

The ability to import templates with multi-line support was not added until LMS 4.1.  You also have to use < and > instead of < and > as the MLTCMD tag is embedded into XML and not part of the XML itself.  Here's an example from the SCH template:

crypto ca authenticate cisco<R><MLTCMD>-----BEGIN CERTIFICATE-----

MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBh

MCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1Ymxp

YyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDT

I4MDgwMTIzNTk1OVowXzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMu

MTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG

9yaXR5MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69q

RUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94f56TuZoAqiN91qyF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NwLnZlcmlzaWduLmNvbTASBgNVHRMBAf8ECDAGAQH/

AgEAMHAGA1UdIARpMGcwZQYLYIZIAYb4RQEHFwMwVjAoBggrBgEFBQcCARYcaHR0cHM6Ly

93d3cudmVyaXNpZ24uY29tL2NwczAqBggrBgEFBQcCAjAeGhxodHRwczovL3d3dy52ZXJp

c2lnbi5jb20vcnBhMDQGA1UdHwQtMCswKaAnoCWGI2h0dHA6Ly9jcmwudmVyaXNpZ24uY2

9tL3BjYTMtZzUuY3JsMA4GA1UdDwEB/wQEAwIBBjBtBggrBgEFBQcBDARhMF+hXaBbMFkw

VzBVFglpbWFnZS9naWYwITAfMAcGBSsOAwIaBBSP5dMahqyNjmvDz4Bq1EgYLHsZLjAlFi

NodHRwOi8vbG9nby52ZXJpc2lnbi5jb20vdnNsb2dvLmdpZjAoBgNVHREEITAfpB0wGzEZ

MBcGA1UEAxMQVmVyaVNpZ25NUEtJLTItNjAdBgNVHQ4EFgQUDURcFlNEwYJ+HSCrJfQBY9

i+eaUwHwYDVR0jBBgwFoAUf9Nlp8Ld7LvwMAnzQzn6Aq8zMTMwDQYJKoZIhvcNAQEFBQAD

ggEBAAyDJO/dwwzZWJz+NrbrioBL0aP3nfPMU++CnqOh5pfBWJ11bOAdG0z60cEtBcDqbr

IicFXZIDNAMwfCZYP6j0M3m+oOmmxw7vacgDvZN/R6bezQGH1JSsqZxxkoor7YdyT3hSaG

bYcFQEFn0Sc67dxIHSLNCwuLvPSxe/20majpdirhGi2HbnTTiN0eIsbfFrYrghQKlFzyUO

yvzv9iNw2tZdMGQVPtAhTItVgooazgW+yzf5VK+wPIrSbb5mZ4EkrZn0L74ZjmQoObj49n

JOhhGbXdzbULJgWOw27EyHW4Rs/iGAZeqa6ogZpHFt4MKGwlJ7net4RYxh84HqTEy2Y=

-----END CERTIFICATE-----

END OF INPUT</MLTCMD><R>yes

Community Member

Multi-line command problems

Joe,

The user guide for RME 4.0.5 in LMS 2.6 discusses in the netconfig section.  I could never get this to work.  Perhaps this is why.

I did discover that using the < > entities works from the schema description.  What I ended up doing was enclosing the CLI in

</p><p>--- cli commands ---</p><p>

This of course prevents the enclosed text from being parsed and allows me to use the <> notation. 

However, now I am stuck with another problem while trying to insert a variable into the banner:

This is the statement within the CDATA tag:

banner motd "

${snmplocation}

* UNAUTHORIZED blah blah....

* ....blah blah!

"

And deploying this results in the ${snmplocation} variable getting expanded outside of (before) the block.  The job output looks like this:

Switch(config-archive-log-cfg)# ! MOTD

Switch(config-archive-log-cfg)#Expanded Snmplocation Variable

Expanded Snmplocation Variable

^

% Invalid input detected at '^' marker.

HHCS010(config-archive-log-cfg)# banner motd "

* UNAUTHORIZED blah blah....

* ....blah blah!

"

Switch(config)#interface range F0/1-48

etc.....

Is there any way to insert a variable inside a MLTCMD block?

Thanks,

-Jeff

Cisco Employee

Multi-line command problems

You might try NOT using a CDATA section and sticking to < and >.  That said, I have not tried a variable embedded into a MLTCMD, so I cannot say if there are bugs there or not.

Note: works as-is in Netconfig templates.  The Template Center is a completely different engine.

Community Member

Multi-line command problems

I originally encountered the variable expansion problem while NOT using the CDATA tags.   I tried the CDATA method to see if that would resolve the problem.  The variable gets expanded outside the MLTCMD block either way.

Cisco Employee

Multi-line command problems

Sorry for the delay.  I have been playing catch up since returning from CiscoLive!.  I found the bug.  The variable expansion was not being done on the full multi-line command.  I have a working patch in my lab.  If you open a TAC service request using the Open TAC Service Request link in the actions panel of this thread, your engineer can contact me for the patch.

Community Member

Multi-line command problems

Yes, I had noticed your conspicuous absense from the forum.  Nor problem, case opened.

Community Member

Multi-line command problems

I got the patch from TAC and it worked perfectly.  Thanks Joe!

Community Member

Multi-line command problems

Hi,

anyone knows about the multi-line command functionality in Prime Infrastructure 1.2?

I didn't find anything in documentations or release notes of PI1.2. I tested it within Automated Deployment templates as it was mentionend in LMS, but it didn't work... :-(

best regards,

Daniel

Cisco Employee

Multi-line command problems

This is definitely not available in PI 1.2, and I don't believe it will work in PI 1.3, either.

Community Member

Multi-line command problems

Thank you, Joseph.

It's a pity. I think it would be nice if such useful things like multi-line commans which were available in LMS before are also available in PI...

1394
Views
0
Helpful
10
Replies
CreatePlease to create content