US11310328B2ActiveUtilityA1

Generic command line interface to an extensible list of cloud platform services

Assignee: SAP SEPriority: May 3, 2019Filed: May 3, 2019Granted: Apr 19, 2022
Est. expiryMay 3, 2039(~12.8 yrs left)· nominal 20-yr term from priority
Inventors:Peter Eberlein
H04L 67/63G06F 9/45512H04L 67/565H04L 67/567G06F 9/547G06F 40/211G06F 2209/541G06F 9/451G06F 9/54H04L 67/2838
76
PatentIndex Score
2
Cited by
129
References
20
Claims

Abstract

Methods and systems are used for providing a generic command line interface to an extensible list of cloud platform services. As an example, a generic command request including a command and command input data is received from a client. A platform service for the command is determined based on command metadata associated with the command. The command input data is mapped to a platform service application programming interface (API) associated with the platform service based on the command metadata associated with the command. The platform service API is called based on the mapping. Response data from the platform service API is mapped to command output data in a generic command response based on the command metadata associated with the command. The generic command response is transmitted to the client.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A computer-implemented method, comprising:
 receiving, by a command line interface (CLI) backend, a generic command request comprising a command and command input data from a client; 
 determining, by the CLI backend, a platform service for the command based on command metadata associated with the command, wherein the command metadata associated with the command comprises a syntax definition of a command, wherein the syntax definition defines mapping of the command to the platform service using mapping rules between user input and a platform service application programming interface (API) associated with the platform service, the mapping rules indicating a name and a content of command output data; 
 mapping, by the CLI backend, the command input data to the platform service API based on the command metadata associated with the command; 
 calling, by the CLI backend, the platform service API based on the mapping; 
 mapping, by the CLI backend, response data from the platform service API to the command output data in a generic command response based on the command metadata associated with the command; and 
 transmitting, by the CLI backend, the generic command response to the client. 
 
     
     
       2. The computer-implemented method of  claim 1 , wherein the command metadata associated with the command further comprises at least one of:
 a uniform resource locator (URL) endpoint of a platform service; 
 an open authorization (OAuth) client to call the platform service; or 
 a platform service API associated with the platform service, and wherein the syntax definition further defines at least one of: 
 which parameters are optional or mandatory; 
 if a particular parameter represents an option or a parameter; 
 if parameters are literals or reference a file or directory; 
 mapping rules between response data from the platform service API and user output; or 
 command syntax and help text. 
 
     
     
       3. The computer-implemented method of  claim 1 , further comprising:
 retrieving, by a generic CLI on the client, the command metadata associated with the command from the CLI backend; 
 validating, by the generic CLI, user input comprising the command provided by a user based on a syntax definition of the command in the command metadata associated with the command; 
 mapping, by the generic CLI, the user input to the generic command request based on the syntax definition of the command; and 
 transmitting, by the generic CLI, the generic command request to the CLI backend. 
 
     
     
       4. The computer-implemented method of  claim 3 , wherein mapping the user input to the generic command request further comprises:
 determining, by the generic CLI on the client, how each parameter in the user input for the command is to be provided in the generic command request. 
 
     
     
       5. The computer-implemented method of  claim 4 , further comprising:
 based on the determination of how each parameter in the user input for the command is to be provided in the generic command request, providing, by the generic CLI, each parameter in the user input in the generic command request, wherein:
 when a parameter is determined to be a literal, providing the parameter in the generic command request as a literal; 
 when a parameter is determined to be a reference to a file:
 reading data content of the file; and 
 providing the parameter in the generic command request as the data content of the file; and 
 
 when a parameter is determined to be a reference to a directory: 
 
 
       reading data content of the directory; and
 providing the parameter in the generic command request as the data content of the directory. 
 
     
     
       6. The computer-implemented method of  claim 1 , further comprising:
 receiving, by a generic CLI on the client, the generic command response from the CLI backend; 
 displaying, by the generic CLI, a response message in the generic command response to a user; and 
 processing, by the generic CLI on the client, the command output data in the generic command response. 
 
     
     
       7. The computer-implemented method of  claim 6 , wherein processing the command output data further comprises:
 when the command output data comprises one or more sets of an environmental variable name and environmental variable data, updating one or more environmental variables corresponding to one or more environmental variable names with corresponding one or more environmental variable data; 
 when the command output data comprises one or more sets of a file name and file data content, updating one or more files corresponding to one or more file names with corresponding file data content; and 
 when the command output data comprises one or more sets of a directory name and directory data content, updating one or more directories corresponding to one or more directory names with corresponding directory content data. 
 
     
     
       8. A non-transitory, computer-readable medium storing one or more instructions executable by a computer system to perform operations comprising:
 receiving, by a command line interface (CLI) backend, a generic command request comprising a command and command input data from a client; 
 determining, by the CLI backend, a platform service for the command based on command metadata associated with the command, wherein the command metadata associated with the command comprises a syntax definition of a command, wherein the syntax definition defines mapping of the command to the platform service using mapping rules between user input and a platform service application programming interface (API) associated with the platform service, the mapping rules indicating a name and a content of command output data; 
 mapping, by the CLI backend, the command input data to the platform service API based on the command metadata associated with the command; 
 calling, by the CLI backend, the platform service API based on the mapping; 
 mapping, by the CLI backend, response data from the platform service API to the command output data in a generic command response based on the command metadata associated with the command; and 
 transmitting, by the CLI backend, the generic command response to the client. 
 
     
     
       9. The non-transitory, computer-readable medium of  claim 8 , wherein the command metadata associated with the command further comprises at least one of:
 a uniform resource locator (URL) endpoint of a platform service; 
 an open authorization (OAuth) client to call the platform service; or 
 a platform service API associated with the platform service, and wherein the syntax definition further defines at least one of: 
 which parameters are optional or mandatory; 
 if a particular parameter represents an option or a parameter; 
 if parameters are literals or reference a file or directory; 
 mapping rules between response data from the platform service API and user output; or 
 command syntax and help text. 
 
     
     
       10. The non-transitory, computer-readable medium of  claim 8 , further comprising:
 retrieving, by a generic CLI on the client, the command metadata associated with the command from the CLI backend; 
 validating, by the generic CLI, user input comprising the command provided by a user based on a syntax definition of the command in the command metadata associated with the command; 
 mapping, by the generic CLI, the user input to the generic command request based on the syntax definition of the command; and 
 transmitting, by the generic CLI, the generic command request to the CLI backend. 
 
     
     
       11. The non-transitory, computer-readable medium of  claim 10 , wherein mapping the user input to the generic command request further comprises:
 determining, by the generic CLI on the client, how each parameter in the user input for the command is to be provided in the generic command request. 
 
     
     
       12. The non-transitory, computer-readable medium of  claim 11 , further comprising:
 based on the determination of how each parameter in the user input for the command is to be provided in the generic command request, providing, by the generic CLI, each parameter in the user input in the generic command request, wherein:
 when a parameter is determined to be a literal, providing the parameter in the generic command request as a literal; 
 when a parameter is determined to be a reference to a file:
 reading data content of the file; and 
 providing the parameter in the generic command request as the data content of the file; and 
 
 when a parameter is determined to be a reference to a directory: 
 
 
       reading data content of the directory; and
 providing the parameter in the generic command request as the data content of the directory. 
 
     
     
       13. The non-transitory, computer-readable medium of  claim 8 , further comprising:
 receiving, by a generic CLI on the client, the generic command response from the CLI backend; 
 displaying, by the generic CLI, a response message in the generic command response to a user; and 
 processing, by the generic CLI on the client, the command output data in the generic command response. 
 
     
     
       14. The non-transitory, computer-readable medium of  claim 13 , wherein processing the command output data further comprises:
 when the command output data comprises one or more sets of an environmental variable name and environmental variable data, updating one or more environmental variables corresponding to one or more environmental variable names with corresponding one or more environmental variable data; 
 when the command output data comprises one or more sets of a file name and file data content, updating one or more files corresponding to one or more file names with corresponding file data content; and 
 when the command output data comprises one or more sets of a directory name and directory data content, updating one or more directories corresponding to one or more directory names with corresponding directory content data. 
 
     
     
       15. A computer-implemented system, comprising:
 one or more computers; and 
 one or more computer memory devices interoperably coupled with the one or more computers and having tangible, non-transitory, machine-readable media storing one or more instructions that, when executed by the one or more computers, perform one or more operations comprising:
 receiving, by a command line interface (CLI) backend, a generic command request comprising a command and command input data from a client; 
 determining, by the CLI backend, a platform service for the command based on command metadata associated with the command, wherein the command metadata associated with the command comprises a syntax definition of a command, wherein the syntax definition defines mapping of the command to the platform service using mapping rules between user input and a platform service application programming interface (API) associated with the platform service, the mapping rules indicating a name and a content of command output data; 
 mapping, by the CLI backend, the command input data to the platform service API based on the command metadata associated with the command; 
 calling, by the CLI backend, the platform service API based on the mapping; 
 mapping, by the CLI backend, response data from the platform service API to the command output data in a generic command response based on the command metadata associated with the command; and 
 transmitting, by the CLI backend, the generic command response to the client. 
 
 
     
     
       16. The computer-implemented system of  claim 15 , wherein the command metadata associated with the command further comprises at least one of:
 a uniform resource locator (URL) endpoint of a platform service; 
 an open authorization (OAuth) client to call the platform service; or 
 a platform service API associated with the platform service, and wherein the syntax definition further defines at least one of: 
 which parameters are optional or mandatory; 
 if a particular parameter represents an option or a parameter; 
 if parameters are literals or reference a file or directory; 
 mapping rules between response data from the platform service API and user output; or 
 command syntax and help text. 
 
     
     
       17. The computer-implemented system of  claim 15 , further comprising:
 retrieving, by a generic CLI on the client, the command metadata associated with the command from the CLI backend; 
 validating, by the generic CLI, user input comprising the command provided by a user based on a syntax definition of the command in the command metadata associated with the command; 
 mapping, by the generic CLI, the user input to the generic command request based on the syntax definition of the command; and 
 transmitting, by the generic CLI, the generic command request to the CLI backend. 
 
     
     
       18. The computer-implemented system of  claim 17 , wherein mapping the user input to the generic command request further comprises:
 determining, by the generic CLI on the client, how each parameter in the user input for the command is to be provided in the generic command request. 
 
     
     
       19. The computer-implemented system of  claim 18 , further comprising:
 based on the determination of how each parameter in the user input for the command is to be provided in the generic command request, providing, by the generic CLI, each parameter in the user input in the generic command request, wherein:
 when a parameter is determined to be a literal, providing the parameter in the generic command request as a literal; 
 when a parameter is determined to be a reference to a file:
 reading data content of the file; and 
 providing the parameter in the generic command request as the data content of the file; and 
 
 when a parameter is determined to be a reference to a directory:
 reading data content of the directory; and 
 providing the parameter in the generic command request as the data content of the directory. 
 
 
 
     
     
       20. The computer-implemented system of  claim 15 , further comprising:
 receiving, by a generic CLI on the client, the generic command response from the CLI backend; 
 displaying, by the generic CLI, a response message in the generic command response to a user; and 
 processing, by the generic CLI on the client, the command output data in the generic command response.

Join the waitlist — get patent alerts

Track US11310328B2 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.