<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: IMC: deploy config file name too long in IMC</title>
    <link>https://community.hpe.com/t5/imc/imc-deploy-config-file-name-too-long/m-p/6941344#M3591</link>
    <description>&lt;P&gt;You should be able to do it with the TCL "file copy" and "file delete" commands.&amp;nbsp;&lt;/P&gt;&lt;P&gt;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://&amp;lt;IP&amp;gt;/&amp;lt;filename&amp;gt; running-config" ?&lt;/P&gt;&lt;P&gt;If it does, then using the Cisco/CiscoIOSGeneric/deploy_running_config_tftp.tcl as a base file, I might do something like this:&lt;/P&gt;&lt;P&gt;Near the top of the file, declare a new filename variable, and then copy the default ($TFTPFile) to this new name:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;set TFTPFileLocal oring.cfg&lt;/P&gt;&lt;P&gt;file copy -force $TFTPFile $TFTPFileLocal&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Change this line: "send "copy tftp://$TFTPServer/$TFTPFile running-config\r"" to this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;send "copy tftp://$TFTPServer/$TFTPFileLocal running-config\r"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;At the end add a cleanup function like this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;file delete -force $TFTPFileLocal&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I haven't tested that, but it will _probably_ work. You may need to play around with paths. &amp;nbsp;Take a look at the *scp.tcl scripts for some other examples of file operations with TCL.&lt;/P&gt;&lt;P&gt;The other wrinkle is that using a&amp;nbsp;static filename will cause you problems, e.g. if&amp;nbsp;there are multiple parallel operations. May be better to at least do something like naming them &amp;lt;IP&amp;gt;.cfg.&lt;/P&gt;&lt;P&gt;See this code block for some examples of manipulating filenames:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;set index1 [string last / $TFTPFile]&lt;BR /&gt;set len [string length $TFTPFile]&lt;BR /&gt;incr index1&lt;BR /&gt;set FileName [string range $TFTPFile $index1 $len]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You might need to do something similar with matching on '_'.&lt;/P&gt;&lt;P&gt;All the above said: That's a pretty terrible device if it only supports TFTP, and only 15-char filenames.&amp;nbsp;Do they support any modern file transfer methods?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Feb 2017 23:06:42 GMT</pubDate>
    <dc:creator>LindsayHill</dc:creator>
    <dc:date>2017-02-17T23:06:42Z</dc:date>
    <item>
      <title>IMC: deploy config file name too long</title>
      <link>https://community.hpe.com/t5/imc/imc-deploy-config-file-name-too-long/m-p/6941011#M3588</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need to configure an adapter for ORing devices under IMC.&lt;/P&gt;&lt;P&gt;I have created the adapter and I can backup the configuration. However&amp;nbsp;when I try to deploy the config it fails.&lt;/P&gt;&lt;P&gt;I investigate and saw the device only support to download through TFTP file name with max character lengh of 15.&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;Is it possible and how can I rename the file before IMC download the config file to the device ?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 08:01:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/imc/imc-deploy-config-file-name-too-long/m-p/6941011#M3588</guid>
      <dc:creator>Daddy72</dc:creator>
      <dc:date>2017-02-17T08:01:43Z</dc:date>
    </item>
    <item>
      <title>Re: IMC: deploy config file name too long</title>
      <link>https://community.hpe.com/t5/imc/imc-deploy-config-file-name-too-long/m-p/6941344#M3591</link>
      <description>&lt;P&gt;You should be able to do it with the TCL "file copy" and "file delete" commands.&amp;nbsp;&lt;/P&gt;&lt;P&gt;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://&amp;lt;IP&amp;gt;/&amp;lt;filename&amp;gt; running-config" ?&lt;/P&gt;&lt;P&gt;If it does, then using the Cisco/CiscoIOSGeneric/deploy_running_config_tftp.tcl as a base file, I might do something like this:&lt;/P&gt;&lt;P&gt;Near the top of the file, declare a new filename variable, and then copy the default ($TFTPFile) to this new name:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;set TFTPFileLocal oring.cfg&lt;/P&gt;&lt;P&gt;file copy -force $TFTPFile $TFTPFileLocal&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Change this line: "send "copy tftp://$TFTPServer/$TFTPFile running-config\r"" to this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;send "copy tftp://$TFTPServer/$TFTPFileLocal running-config\r"&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;At the end add a cleanup function like this:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;file delete -force $TFTPFileLocal&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I haven't tested that, but it will _probably_ work. You may need to play around with paths. &amp;nbsp;Take a look at the *scp.tcl scripts for some other examples of file operations with TCL.&lt;/P&gt;&lt;P&gt;The other wrinkle is that using a&amp;nbsp;static filename will cause you problems, e.g. if&amp;nbsp;there are multiple parallel operations. May be better to at least do something like naming them &amp;lt;IP&amp;gt;.cfg.&lt;/P&gt;&lt;P&gt;See this code block for some examples of manipulating filenames:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;set index1 [string last / $TFTPFile]&lt;BR /&gt;set len [string length $TFTPFile]&lt;BR /&gt;incr index1&lt;BR /&gt;set FileName [string range $TFTPFile $index1 $len]&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You might need to do something similar with matching on '_'.&lt;/P&gt;&lt;P&gt;All the above said: That's a pretty terrible device if it only supports TFTP, and only 15-char filenames.&amp;nbsp;Do they support any modern file transfer methods?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2017 23:06:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/imc/imc-deploy-config-file-name-too-long/m-p/6941344#M3591</guid>
      <dc:creator>LindsayHill</dc:creator>
      <dc:date>2017-02-17T23:06:42Z</dc:date>
    </item>
  </channel>
</rss>

