(一)openstack的命令幫助:

(1)使用幫助命令:

①命令后面加help格式:

1、neutron help|grep router //類似這樣的格式幫助就能得到對應的功能

2、glance help image-update //類似這樣的幫助


[] 是可選命令

<> 是必須命令




②使用幫助命令:

1、nova help boot {boot是nova的一個子命令},一般情況下查子命令的幫助,就是nova help boot,然后就能得到他的語法結構

[root@controller ~(keystone_user1)]# nova help boot

usage: nova boot [--flavor ] [--image ]

[--image-with ] [--boot-volume ]

[--snapshot ] [--min-count ]

[--max-count ] [--meta ]

[--file ] [--key-name ]

[--user-data ]

[--availability-zone ]

[--security-groups ]

[--block-device-mapping ]

[--block-device key1=value1[,key2=value2...]]

[--swap ]

[--ephemeral size=[,format=]]

[--hint ]

[--nic ]

[--config-drive ] [--poll]



2、nova boot --flavor web1 --image web1 --key-name key01 --security-groups sec01 --nic net-id=ef08363a-c9d7-4fc1-99f5-bc80c0043a29 web1 //啟動一個云主機



Boot a new server.


Positional arguments:

Name for the new server


Optional arguments:

--flavor Name or ID of flavor (see nova flavor-list).

--image Name or ID of image (see nova image-list).

--image-with Image metadata property (see nova image-

show).

--boot-volume Volume ID to boot from.

--snapshot Snapshot ID to boot from (will create a

volume).

--min-count Boot at least servers (limited by

quota).

--max-count Boot up to servers (limited by

quota).

--meta Record arbitrary key/value metadata to

/meta.js on the new server. Can be specified

multiple times.

--file Store arbitrary files from locally

to on the new server. You may store

up to 5 files.

--key-name Key name of keypair that should be created

earlier with the command keypair-add

--user-data user data file to pass to be exposed by the

metadata server.

--availability-zone

The availability zone for server placement.

--security-groups

Comma separated list of security group names.

--block-device-mapping

Block device mapping in the format

name>=:::

terminate>.

--block-device key1=value1[,key2=value2...]

Block device mapping with the keys: id=UUID

(image_id, snapshot_id or volume_id only if

using source image, snapshot or volume)

source=source type (image, snapshot, volume or

blank), dest=destination type of the block

device (volume or local), bus=devices bus

(e.g. uml, lxc, virtio, ...; if omitted,

hypervisor driver chooses a suitable default,

honoured only if device type is supplied)

type=device type (e.g. disk, cdrom, ...;

defaults to disk) device=name of the device

(e.g. vda, xda, ...; if omitted, hypervisor

driver chooses suitable device depending on

selected bus), size=size of the block device

in GB (if omitted, hypervisor driver

calculates size), format=device will be

formatted (e.g. swap, ntfs, ...; optional),

bootindex=integer used for ordering the boot

disks (for image backed instances it is equal

to 0, for others need to be specified) and

shutdown=shutdown behaviour (either preserve

or remove, for local destination set to

remove).

--swap Create and attach a local swap block device of

MB.

--ephemeral size=[,format=]

Create and attach a local ephemeral block

device of GB and format it to .

--hint Send arbitrary key/value pairs to the

scheduler for custom use.

--nic

Create a NIC on the server. Specify option

multiple times to create multiple NICs. net-

id: attach NIC to network with this UUID

(either port-id or net-id must be provided),

v4-fixed-ip: IPv4 fixed address for NIC

(optional), v6-fixed-ip: IPv6 fixed address

for NIC (optional), port-id: attach NIC to

port with this UUID (either port-id or net-id

must be provided).

--config-drive Enable config drive

--poll Report the new server boot progress until it

completes.






(2)幫助命令實例:

①cinder help create

usage: cinder create [--snapshot-id ]

[--source-volid ] [--image-id ]

[--display-name ]

[--display-description ]

[--volume-type ]

[--availability-zone ]

[--metadata [ [ ...]]]


Creates a volume.


Positional arguments:

Volume size, in GBs.


Optional arguments:

--snapshot-id

Creates volume from snapshot ID. Default=None.

--source-volid

Creates volume from volume ID. Default=None.

--image-id

Creates volume from image ID. Default=None.

--display-name

Volume name. Default=None.

--display-description

Volume description. Default=None.

--volume-type

Volume type. Default=None.

--availability-zone

Availability zone for volume. Default=None.

--metadata [ [ ...]]

Metadata key and value pairs. Default=None.


1、 cinder create size 1 // 尖括號是必選項,中括號是可選項,所以執行這個就可以






②假設要創建一個子網:{就是在要使用的命令前面加help}

neutron help subnet-create

usage: neutron subnet-create [-h] [-f {shell,table,value}] [-c COLUMN]

[--max-width ] [--prefix PREFIX]

[--request-format {json,xml}]

[--tenant-id TENANT_ID] [--name NAME]

[--gateway GATEWAY_IP] [--no-gateway]

[--allocation-pool start=IP_ADDR,end=IP_ADDR]

[--host-route destination=CIDR,nexthop=IP_ADDR]

[--dns-nameserver DNS_NAMESERVER]

[--disable-dhcp] [--enable-dhcp]

[--ipv6-ra-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]

[--ipv6-address-mode {dhcpv6-stateful,dhcpv6-stateless,slaac}]

[--ip-version {4,6}]

NETWORK CIDR


Create a subnet for a given tenant.


positional arguments:

NETWORK Network ID or name this subnet belongs to.

CIDR CIDR of subnet to create.


optional arguments:

-h, --help show this help message and exit

--request-format {json,xml}

The XML or JSON request format.

--tenant-id TENANT_ID

The owner tenant ID.

--name NAME Name of this subnet.

--gateway GATEWAY_IP Gateway IP of this subnet.

--no-gateway No distribution of gateway.

--allocation-pool start=IP_ADDR,end=IP_ADDR

Allocation pool IP addresses for this subnet (This

option can be repeated).

--host-route destination=CIDR,nexthop=IP_ADDR

Additional route (This option can be repeated).

--dns-nameserver DNS_NAMESERVER

DNS name server for this subnet (This option can be

repeated).

--disable-dhcp Disable DHCP for this subnet.

--enable-dhcp Enab

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://specialneedsforspecialkids.com/yun/124959.html

相關文章

  • #私藏項目實操分享# 關于 Node.js scoped module 一些理解

    摘要:包名只需要在它發布的范圍內是唯一的,而不是整個注冊表。作用域是將相關包組合在一起的一種方式,也會影響處理包的方式。因此,這也是向組織發出官方軟件包信號的好方法。 看這樣一條命令:npm install @angular/router --save這個 @angular/router 代表什么含義?我們使用下面的...

    番茄西紅柿 評論0 收藏2637
  • #私藏項目實操分享# 什么是 SAP Support Package Stack

    摘要:什么是支持包堆棧是中包含的所有軟件組件的和支持包列表。支持包堆棧有一個版本號和一個堆棧號,例如,。版本號是下圖紅色區域所示,堆棧號是下圖綠色區域所示實施的前提條件應始終在客戶端中應用支持包。 什么是 Support Package?當 SAP 的最終用戶發現 SAP 產品中的錯誤時,他會向 SAP 支持人員報告...

    番茄西紅柿 評論0 收藏2637
  • #私藏項目實操分享# 什么是 SAP Spartacus UI feature level

    摘要:為了保持嚴格的向后兼容性,包含可配置的功能級別,這有助于在改進現有組件的同時保持可預測的行為。默認情況下,功能級別設置為最新的主要版本例如。盡管功能標志用于許多不同的功能,但不能保證所有功能都適用于功能標志和功能級別的所有可能組合。 Spartacus 庫的每個次要版本都包含新功能,這些功能通常是對現有組件的改...

    番茄西紅柿 評論0 收藏2637
  • #私藏項目實操分享# SAP 電商云 UI State persistence 狀態持久化設計入口

    摘要:在版之前,實現狀態持久性的唯一方法是使用一種稱為的簡單的聲明性機制,它允許您提供屬性鍵以在存儲中持久化。當您啟動您的應用程序時,這些持久化的鍵用于設置存儲中的初始狀態。是一個,它描述了特定狀態的有效上下文。例如,活動購物車僅對一個有效。 在 Spartacus 2.0 版之前,實現狀態持久性的唯一方法是使用一種...

    不知名網友 評論0 收藏0
  • #私藏項目實操分享# 離線地圖打點解決方案與算法

    摘要:他們的算法基于兩種,一是庫,二是瓦片定位。如果嫌太費事或者緊急使用可以找我發送源碼或點位庫計算距離核心計算方式 很多專網環境下無法像互聯網一樣直接使用各廠提供的經緯度和地址的互逆轉換,像gd或者bd等提供的離線轉換引擎大概價位在200w+。他們的算法基于兩種,一是POI庫,二是瓦片定位。 poi庫的話其實是可以通過算法算出...

    lifesimple 評論0 收藏0

發表評論

0條評論