2

The user data format for the IOS appliance uses the following:

ios-config-0001="hostname test-csr-deployment-001"
ios-config-0002="banner exec |Hostname: test-csr-deployment-001\r\nRegion: eu-west-2|"

The commands are accepted, but the returned value is not split to multiline

show banner exec
Hostname: test-csr-deployment-001rnRegion: eu-west-2

How do I split the multiline?

I've also tried:

ios-config-0002="banner exec |Hostname: test-csr-deployment-001\015\012Region: eu-west-2|"
output:
Hostname: test-csr-deployment-001015012Region: eu-west-2

ios-config-000x="set NEWL "\0""
ios-config-000x="set NEWL1 "12""
ios-config-000x="set NEWL $NEWL$NEWL1"
ios-config-000x="banner exec |Hostname: test-csr-deployment-001$NEWLRegion: eu-west-2|"
error:
Invalid input detected at '^' marker
output:
Hostname: test-csr-deployment-001$NEWLRegion: eu-west-2

ios-config-0002="banner exec |Hostname: test-csr-deployment-001"
ios-config-0003="Region: eu-west-2|"
error:
Invalid input detected at '^' marker
output:
Hostname: test-csr-deployment-001

I also tried double escapes, but the config then doesn't load at all.

Ideally output should be:

show banner exec
Hostname: test-csr-deployment-001
Region: eu-west-2
itChi
  • 642
  • 6
  • 19

1 Answers1

0

While configuring via CLI, we use the delimiter marks the beginning and the end of the message and new lines are accepted as far they are within the delimiter.

I don't know what language you are using in typical python way we could do something like this

ios-config-0002='''banner exec # Line 1
Line 2 # '''