Bug 780 - Implement "interface description" series commands

Review Request #334 — Created July 15, 2024 and updated

luhsuan
AVX2
rel_avx_2_7_2
780
jasonchou, milliechou, timlai, weikai, wli

Implement the following "interface description" series commands:

  1. interface description <port number> <description>: add a description to a port (except management port).
  2. no interface description <port number>: delete a description to a port (except management port).

We use JSON to store the description ("description": "<your description>") in the corresponding ifalias of an interface.

What's more, user can check the description using show interface.

  • (PASSED) The port with interface description set should show the description using show interface.
luhsuan
luhsuan
Review request changed

Description:

   

Implement the following "interface description" series commands:

   
~  
  1. interface description <port number> <description>: add a description to a port.
~  
  1. no interface description <port number>: delete a description to a port.
  ~
  1. interface description <port number> <description>: add a description to a port (except management port).
  ~
  1. no interface description <port number>: delete a description to a port (except management port).
   
~  

We use JSON to store the description ("description": "<your description>") in ifalias.

~   When deleting the description attribute after executing no interface description (therefore, an empty content of JSON will appear in ifalias).

  ~

We use JSON to store the description ("description": "<your description>") in the corresponding ifalias of an interface.

  ~
  +

What's more, user can check the description using show interface.

Testing Done:

~  
  • (PASSED) The ifalias should appear a JSON with content of {"description":"<your description>"} after executing interface description.
  ~
  • (PASSED) The port with interface description set should show the description using show interface.
-  
  • (PASSED) The ifalias should appear a JSON with content of {} after executing no interface description.
timlai
  1. Ship It!
  2. 
      
weikai
  1. Ship It!
  2. 
      
milliechou
  1. Ship It!
  2. 
      
jasonchou
  1. Ship It!
  2. 
      
Loading...