DMTF Tutorial > WBEM > CLP

CLP

 

The Command Line Protocol (CLP) is a human-oriented command-line protocol that is suitable for scripting management environments. CLP defines

  • a mapping to a subset of the CIM Schema
  • a command syntax and grammar
  • output syntax format
  • session protocol
  • transport protocols

The CLP is a command/response protocol (and not a command-line interface). Management requests are initiated by a CLP Client and are transmitted through a text-message-based transport protocol on the wire (for example, Telnet or SSHv2) to a Management Access Point (MAP). The MAP hosts a CLP Service which processes received commands and returns an appropriately formatted response to the requesting Client.

NOTE: Although the CLP currently defines mappings to Telnet and SSHv2, any transport capable of carrying command/response messages can also be used.

The CLP supports internationalization in that a Client can specify a desired language in the commands that it issues to a MAP. If the MAP may supports the requested language, output can be represented in the response to the requesting Client in the appropriate language translation.

The CLP syntax is extensible through its four supported mechanisms. The general CLP syntax is as follows:

<Verb> [<Options>] [<Target>] [<Properties>]

  • Verb is the specific command or action being performed. These verbs enable retrieving and managing data ("set", "show"), creating and deleting data ("create", "delete"), modifying the state of a managed element ("set", "reset", "start", "stop"), managing the current session ("cd", "version", "exit") and providing command information ("help").
  • Options are command options that modify the action or behaviour of the Verb. Options enable changing output format, applying the command to nested levels and requesting help or version information.
  • Target is the address or path of the target of the issued command. The format of this address or path is defined in the SM Managed Element Addressing Specification. Only one target specified per issued command, but the Target can refer to an individual managed element (for example, a disk or NIC) or a collection of managed elements.
  • Properties are the attributes of the Target that might contain values that are needed to process the command. Properties identify the properties of the Target's class that are to be retrieved or acted upon by the command. (that is, these are properties defined in the CIM class)
  • The following examples show CLP syntax. The first example demonstrates how to retrieve the speed and port type of a given Ethernet port. The second example demonstrates how to modify the current Ethernet port speed.

      show -display properties=speed,porttype /hostABC/ethernet1
      set /hostABC/ethernet1 speed=1000

    NOTE: The CLP syntax is not case sensitive.