- Community Home
- >
- Networking
- >
- IMC
- >
- Re: IMC: deploy config file name too long
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2017 12:01 AM
02-17-2017 12:01 AM
IMC: deploy config file name too long
Hello,
I need to configure an adapter for ORing devices under IMC.
I have created the adapter and I can backup the configuration. However when I try to deploy the config it fails.
I investigate and saw the device only support to download through TFTP file name with max character lengh of 15.
As IMC, when it backups the config put a long name: IP_running/startup_datetime.cfg, the name of the file is too long and the device don't understand it.
Is it possible and how can I rename the file before IMC download the config file to the device ?
Thanks,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2017 03:06 PM
02-17-2017 03:06 PM
Re: IMC: deploy config file name too long
You should be able to do it with the TCL "file copy" and "file delete" commands.
I don't know anything about ORing network devices. Does it work like IOS, where IMC logs into the switch, and issues a command like "copy tftp://<IP>/<filename> running-config" ?
If it does, then using the Cisco/CiscoIOSGeneric/deploy_running_config_tftp.tcl as a base file, I might do something like this:
Near the top of the file, declare a new filename variable, and then copy the default ($TFTPFile) to this new name:
set TFTPFileLocal oring.cfg
file copy -force $TFTPFile $TFTPFileLocal
Change this line: "send "copy tftp://$TFTPServer/$TFTPFile running-config\r"" to this:
send "copy tftp://$TFTPServer/$TFTPFileLocal running-config\r"
At the end add a cleanup function like this:
file delete -force $TFTPFileLocal
I haven't tested that, but it will _probably_ work. You may need to play around with paths. Take a look at the *scp.tcl scripts for some other examples of file operations with TCL.
The other wrinkle is that using a static filename will cause you problems, e.g. if there are multiple parallel operations. May be better to at least do something like naming them <IP>.cfg.
See this code block for some examples of manipulating filenames:
set index1 [string last / $TFTPFile]
set len [string length $TFTPFile]
incr index1
set FileName [string range $TFTPFile $index1 $len]
You might need to do something similar with matching on '_'.
All the above said: That's a pretty terrible device if it only supports TFTP, and only 15-char filenames. Do they support any modern file transfer methods?