Mapping Between the System API Functions and CLI Commands

Added by Gaurav Joshua Vaz , last edited by Gaurav Joshua Vaz on Jan 21, 2008  (view change)
Tags: 

A brief description of the mapping between the System API functions and CLI commands.

Summary

The System API is an exact map of the CLI commands that are present on the system. Each CLI command has a corresponding API function equivalent that uses the same parameters and can be used to create custom applications.

The following are some points to remember when looking for an equivalent API function for a CLI command on the system.

  1. All API names are same as the CLI command names. For example, the "set lb vserver" command's equivalent API function is  "setlbvserver".
  2. All "show" commands have an equivalent "get" API function. For example, the "show lb vserver" command's equivalent API function is "getlbvserver".
  3. Every "add" API function has the arguments required to create a new entity. The rest of the arguments can be set using the corresponding "set" command. For example,
    addlbvserver(string name, vservicetypeEnum servicetype, string ipaddress, System.UInt32 port, System.UInt32 range, enabledisabledEnum state)
  4. The Set / Bind / Unbind API has different API functions to set individual arguments on the system, but all the dependent arguments are in the same API.

For example,

setlbvserver_pq(string name, onoffEnum pq)

bindlbvserver_policy(string name, string policyname, System.UInt32 priority)

bindlbvserver_service(string name, string servicename, System.UInt32 weight)

setlbvserver_lbmethod(string name, lbmethodEnum lbmethod, System.UInt32 hashlength, string netmask)
 

More Information