Skip to content

Latest commit

 

History

History
103 lines (67 loc) · 1.93 KB

cli.md

File metadata and controls

103 lines (67 loc) · 1.93 KB

API Server command line client

API Server CLI is contained in contrailcli executable. It consists of following commands:

  • show
  • list
  • sync
  • set
  • rm
  • delete
  • schema

Show command

Show command shows data of specified resource.

contrailcli show virtual_network first-uuid

Invoke command with empty schema identifier in order to show possible usages:

contrailcli show

List command

List command lists data of specified resources.

There are also multiple parameters available, such as --filters and --fields. Display them with contrailcli list -h command.

contrailcli list virtual_network

Invoke command with empty schema identifier in order to show possible usages:

contrailcli list -c integration/contrailcli.yml

Sync command

Sync command creates or updates resources with data defined in given YAML file. It creates new resource for every not already existing resource.

contrailcli sync pkg/client/testdata/vns.yml

Input file content

Set command

Set updates properties of specified resource.

contrailcli set virtual_network first-uuid "external_ipam: true" -c integration/contrailcli.yml

Invoke command with empty schema identifier in order to show possible usages:

contrailcli set

Rm command

Rm removes a resource with specified UUID.

contrailcli rm virtual_network second-uuid

Rm command output is empty on successful operation.

Invoke command with empty schema identifier in order to show possible usages:

contrailcli rm

Delete command

Delete removes resources specified in given YAML file.

contrailcli delete pkg/client/testdata/vns.yml

Input file content

Delete command returns no output.

Schema command

Schema command shows schema for specified resource.

contrailcli schema virtual_network