(一)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

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/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条评论