As part of PicOS improvements, the CLI configuration structure may change between releases. Some commands or knobs may be added, removed, or modified. At the same time, a switch should be able to be upgraded without impact to a network, while still keeping the configuration intact.
A process was defined to achieve both of those goals (improved CLI with smooth upgrade).
When a command is modified in a release, the old command is marked with a "deprecated" flag.
A "deprecated" command can still be used on the next PicOS version, and, at a minimum, on all the PicOS versions published during the life time of this version (typically 9 months for a standard release).
Deprecated commands are hidden from the CLI, so a new user cannot access it without specific knowledge of the command (old commands cannot be auto-completed by tab key or shown by “?”). The old command must be fully entered manually to be used.
A warning message will be shown when a commit is done using a deprecated command.
Here is an example:
On PicOS 2.4, the command of “set interface management-ethernet” was deprecated and replaced by “set system management-ethernet.”
This means that both of these commands work on PicOS 2.4, and the “interface management-ethernet” will be removed in a future release (9 months after PicOS 2.4 is published).
When using "set interface management-ethernet” in CLI, user will get the following information:
Configure node "interface management-ethernet" has been deprecated in version 2.4, please use "system management-ethernet" instead.
Note: The prompted information will not disappear until you remove the deprecated command.
When upgrading an image from an old version to a new one with configuration save, there will be some configuration nodes that are marked as deprecated in the new version, and user will get some notice information when committing in CLI.
For example, the following example reflects what may have happened during an upgrade from 2.3 to 2.4 with configuration saved, after upgrading and removing VLAN:
When upgrading image from an old version to a new one, with a configuration that contains deprecated nodes, the upgrade will fail. Remove the deprecated nodes on the configuration tree. Then, install upgrade again.