官术网_书友最值得收藏!

Using the CLI

Within the CLI shell, there is a common and useful way to obtain the list of available commands and resources: the Tab key.

By hitting the Tab key on your keyboard, you can see all available commands and resources, with regard to the current context/resource you are in.

But first, let's define a resource for you.

Everything manageable is exposed via a tree of addressable resources. Resources expose attributes and operations. The concept is very similar to JMX Open MBeans, but note the following:

  • Resources are organized in a tree
  • Atomic multi-step operations are supported
  • Operations across servers are supported

Hit the Tab key to see all the available commands and resources, as shown in the screenshot here:

The Tab key is also used for auto completion of commands and parameters.

You can navigate through the resources, as you would do with your filesystem, by invoking the cd command followed by the resource name, as depicted here:

As you can see from the previous example, the Tab key is very important to find your desired context or command.

There are also two special characters: the forward slash (/) and the colon (:). The first one is used to navigate through the context, as you do for folders. The second one, the colon, is used to invoke operations available for the resource you are in.

You don't need to first position in a context and then invoke methods in it, as follows:

You could just navigate through the resources and invoke resource methods in line with the CLI, as follows:

Now we will take a look at those commands that execute common tasks.

主站蜘蛛池模板: 饶阳县| 毕节市| 赞皇县| 仙游县| 滦平县| 黄平县| 青田县| 麦盖提县| 拉萨市| 萍乡市| 和田县| 肥城市| 南充市| 东城区| 鹿邑县| 泰顺县| 武冈市| 新津县| 新源县| 长白| 英山县| 澄城县| 任丘市| 辽阳市| 诸城市| 蕲春县| 济南市| 松桃| 甘孜| 冕宁县| 陇南市| 雅安市| 仁怀市| 合山市| 射洪县| 茂名市| 佛冈县| 兖州市| 昔阳县| 余干县| 新绛县|