ONAP CLI Capabilities Query #cli


kenji.le@...
 

Hi ONAP CLI team,

 

We are considering ONAP CLI for a new 5G RAN project potentially. Could you please let us know these capabilities of ONAP CLI?

 

  1. Support User-specific settings

      There are a number of cli configuration parameters (called user variables) which can be set either permanently or on a session basis.  These settings have a default value which is defined in the file xxx. If one or more user variables need to be changed from the default value, It is also possible to define user variables on a session basis by using the command.

                I suppose this should be possible:

                                - Session basis: use set/unset command

                                - Permanent: use profile command (i.e. profiling arguments)

  1. Support Scripting:

Support Python/TCL/Perl scripts, save the result into a plain text file.    

Sample content of scripts to retrieve the meters of given services:

 

  1. Get the name list of service running in a node
  2. Get the meters (xxx) from a given service included in the name list.
  3. If meters exist, save the meters in a local file named as meters.
  4. If meters does NOT exist, save the “Meters does NOT exist” in the command line log file.
  1. Support interactive mode to get the input from end-user, such as value of a parameters, Y/N selection. For example:

Enter the name of the new server definition:

Enter the administrator login ID: (admin)

Enter the administrator password:

Save the admin password for this server? (Y/n)

Enter the context root of the administration services: (admin)

Enter the connection timeout in seconds: (30)

Make this server the default? (Y/n)Copy code

·         Defaults are displayed in parenthesis. Press the Enter key to select the default.

Questions that require a yes or no answer display (Y/n) or (y/N). The character in uppercase is the default. Press the Enter key to select the default, or y (for yes) or n (for no) followed by the Enter key. For example, if you press Enter after the last prompt in the example, the server profile that you are defining becomes the default server profile. 

  1. Read config info into a XML config file.
  2. Output result/response of command to a XML file
  3. Pass a image file to micro service in a sequence.
  4. Get a file from micro service
  5. Wrap the existing K8S kubectl command into customer commands developed in the plugins.

       # Get commands with basic output

kubectl get services                          # List all services in the namespace

kubectl set image deployment/frontend www=image:v2               # Rolling update "www" containers of "frontend" deployment, updating the image
kubectl logs my-pod                                 # dump pod logs (stdout)
kubectl logs -l name=myLabel                        # dump pod logs, with label name=myLabel (stdout)
https://kubernetes.io/docs/reference/kubectl/cheatsheet/

 

Thanks in advance!

 

Best Regards,

Khoa


Kanagaraj Manickam
 

Hello Kenji,

 

I am sorry that, I have missed to reply to this mail thread. ONAP CLI already having capabilities #1, #2, #4, #5 ad #8. While other requirments can be easily enabled as ONAP CLI supports easy extension. Which can be done in H release.

 

Let me know your if you have further questions on it?

 

Regards

Kanag

 

From: onap-discuss@... [mailto:onap-discuss@...] On Behalf Of kenji.le@...
Sent: Monday, November 23, 2020 8:55 PM
To: onap-discuss@...
Subject: [onap-discuss] ONAP CLI Capabilities Query #cli

 

Hi ONAP CLI team,

 

We are considering ONAP CLI for a new 5G RAN project potentially. Could you please let us know these capabilities of ONAP CLI?

 

  1. Support User-specific settings

      There are a number of cli configuration parameters (called user variables) which can be set either permanently or on a session basis.  These settings have a default value which is defined in the file xxx. If one or more user variables need to be changed from the default value, It is also possible to define user variables on a session basis by using the command.

                I suppose this should be possible:

                                - Session basis: use set/unset command

                                - Permanent: use profile command (i.e. profiling arguments)

  1. Support Scripting:

Support Python/TCL/Perl scripts, save the result into a plain text file.    

Sample content of scripts to retrieve the meters of given services:

 

a.       Get the name list of service running in a node

b.      Get the meters (xxx) from a given service included in the name list.

c.       If meters exist, save the meters in a local file named as meters.

d.      If meters does NOT exist, save the “Meters does NOT exist” in the command line log file.

  1. Support interactive mode to get the input from end-user, such as value of a parameters, Y/N selection. For example:

Enter the name of the new server definition:

Enter the administrator login ID: (admin)

Enter the administrator password:

Save the admin password for this server? (Y/n)

Enter the context root of the administration services: (admin)

Enter the connection timeout in seconds: (30)

Make this server the default? (Y/n)Copy code

·         Defaults are displayed in parenthesis. Press the Enter key to select the default.

Questions that require a yes or no answer display (Y/n) or (y/N). The character in uppercase is the default. Press the Enter key to select the default, or y (for yes) or n (for no) followed by the Enter key. For example, if you press Enter after the last prompt in the example, the server profile that you are defining becomes the default server profile. 

  1. Read config info into a XML config file.
  2. Output result/response of command to a XML file
  3. Pass a image file to micro service in a sequence.
  4. Get a file from micro service
  5. Wrap the existing K8S kubectl command into customer commands developed in the plugins.

       # Get commands with basic output

kubectl get services                          # List all services in the namespace

kubectl set image deployment/frontend www=image:v2               # Rolling update "www" containers of "frontend" deployment, updating the image
kubectl logs my-pod                                 # dump pod logs (stdout)
kubectl logs -l name=myLabel                        # dump pod logs, with label name=myLabel (stdout)
https://kubernetes.io/docs/reference/kubectl/cheatsheet/

 

Thanks in advance!

 

Best Regards,

Khoa