더북(TheBook)

7. 어떤 명령어가 있는지 잘 모르겠다면 help 명령어를 이용해 확인할 수 있습니다. 또 어떤 옵션과 정보를 넣어야 할지 모를 때도 help 명령어로 다음과 같이 확인할 수 있습니다.

stack@ubuntu:~$ openstack help network
Command "network" matches:
network create
network delete
network list
network set
network show
stack@ubuntu:~$ openstack help network create
usage: openstack network create [-h] [-f {json,shell,table,value,yaml}]
                                [-c COLUMN] [--max-width <integer>]
                                [--noindent] [--prefix PREFIX]
                                [--share | --no-share] [--enable | --disable]
                                [--project <project>]
                                [--project-domain <project-domain>]
                                [--availability-zone-hint <availability-zone>]
                                [--external | --internal]
                                [--default | --no-default]
                                [--provider-network-type <provider-network-type>]
                                [--provider-physical-network <provider-
physical-network>]
                                [--provider-segment <provider-segment>]
                                <name>

Create new network

positional arguments:
  <name>                 New network name

optional arguments:
  -h, --help             show this help message and exit
  --share                Share the network between projects
  --no-share             Do not share the network between projects
  --enable               Enable network (default)
  --disable              Disable network
  --project <project>    Owner's project (name or ID)
  --project-domain <project-domain>
                         Domain the project belongs to (name or ID). This can
                         be used in case collisions between project names
                         exist.

  --availability-zone-hint <availability-zone>
                         Availability Zone in which to create this network
                         (Network Availability Zone extension required, repeat
                         option to set multiple availability zones)
  --external             Set this network as an external network (external-net
                         extension required)
  --internal             Set this network as an internal network (default)
  --default              Specify if this network should be used as the default
                         external network
  --no-default           Do not use the network as the default external
                         network. (default)
  --provider-network-type <provider-network-type>
                         The physical mechanism by which the virtual network is
                         implemented. The supported options are: flat, gre,
                         local, vlan, vxlan
  --provider-physical-network <provider-physical-network>
                         Name of the physical network over which the virtual
                         network is implemented
  --provider-segment <provider-segment>
                         VLAN ID for VLAN networks or Tunnel ID for GRE/VXLAN
                         networks

output formatters:
  output formatter options

  -f {json,shell,table,value,yaml}, --format {json,shell,table,value,yaml}
                         the output format, defaults to table
  -c COLUMN, --column COLUMN
                         specify the column(s) to include, can be repeated

table formatter:
  --max-width <integer>
                         Maximum display width, 0 to disable

json formatter:
  --noindent             whether to disable indenting the JSON
shell formatter:
  a format a UNIX shell can parse (variable="value")

  --prefix PREFIX     add a prefix to all variable names
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.