nova後端命令彙總(三)

    和網絡相關的操做主要包括:add-fixed-ip、add-secgroup、fixed-ip-get 、fixed-ip-reserve、fixed-ip-unreserve、floating-ip-associate、floating-ip-bulk-create、floating-ip-bulk-delete、floating-ip-bulk-list、floating-ip-create、floating-ip-delete、floating-ip-disassociate、floating-ip-list 、floating-ip-pool-list、interface-attach、interface-detach、interface-list、network-associate-host、network-associate-project、network-create、network-delete、network-disassociate、network-list、network-show、refresh-network、remove-fixed-ip、remove-secgroup、reset-network、secgroup-add-default-rule、secgroup-add-group-rule、secgroup-add-rule、secgroup-create、secgroup-delete、secgroup-delete-default-rule、secgroup-delete-group-rule、secgroup-delete-rule、secgroup-list、secgroup-list-default-rules、secgroup-list-rules、secgroup-update、tenant-network-create、tenant-network-delete、tenant-network-list、tenant-network-show。sass

1.add-fixed-ip安全

    功能:給虛擬機綁定一個固定IP
    用法: nova add-fixed-ip <server> <network-id>
    參數: <server> 虛擬機的名稱或者UUID; <network-id> 網絡的ID

2.add-secgroup網絡

    功能:給虛擬機添加安全組
    用法: nova add-secgroup <server> <secgroup>
    參數: <server> 虛擬機的名稱或者UUID; <secgroup> 安全組的名稱或ID

3.fixed-ip-gettcp

    功能:獲取固定IP的信息
    用法: nova fixed-ip-get <fixed-ip>
    參數: <fixed-ip> 固定IP地址

4.fixed-ip-reserve.net

    功能:給虛擬機預留固定IP
    用法: nova fixed-ip-reserve <fixed-ip>
    參數: <fixed-ip> 固定IP地址

5.fixed-ip-unreserveserver

    功能:虛擬機取消預留固定IP
    用法: nova fixed-ip-unreserve <fixed-ip>
    參數: <fixed-ip> 固定IP地址

6.floating-ip-associateip

    功能:給虛擬機分配浮動IP
    用法: nova floating-ip-associate [--fixed-address <fixed_address>]
                                  <server> <address>
    參數: [--fixed-address <fixed_address>] 固定IP地址  <server> 虛擬機的名稱或者ID <address> 須要分配的浮動IP

7.floating-ip-bulk-createci

    功能:建立浮動IP地址段
    用法: nova floating-ip-bulk-create [--pool <pool>] [--interface <interface>]
                                  <range>
    參數: [--pool <pool>] 地址池 [--interface <interface>] 網口 <range> 要建立的地址範圍

8.floating-ip-bulk-delete資源

    功能:刪除浮動IP地址段
    用法: nova floating-ip-bulk-delete <range>
    參數: <range> 要刪除的地址範圍

9.floating-ip-bulk-listrem

    功能:列舉浮動IP地址段
    用法: nova floating-ip-bulk-list [--host <host>]
    參數: [--host <host>] 經過host進行過濾

10.floating-ip-create

    功能:爲當前的租戶建立浮動IP
    用法: nova floating-ip-create [<floating-ip-pool>]
    參數: [<floating-ip-pool>] 浮動IP池名稱

11.floating-ip-delete

    功能:刪除浮動IP
    用法: nova floating-ip-delete <address>
    參數:<address> 浮動IP地址

12.floating-ip-disassociate

    功能:解綁浮動IP
    用法: nova floating-ip-disassociate <server> <address>
    參數:<server> 虛擬機的名稱或者ID <address> 浮動IP地址

13.floating-ip-list

    功能:顯示全部浮動IP
    用法: nova floating-ip-list
    參數:無

14.floating-ip-pool-list

    功能:顯示全部浮動IP地址池
    用法: nova floating-ip-pool-list
    參數:無

15.interface-attach

    功能:給虛擬機掛載一塊新的網卡
    用法: nova interface-attach [--port-id <port_id>] [--net-id <net_id>] [--fixed-ip <fixed_ip>] <server>
    參數:port_id 端口ID  net_id 網絡ID fixed_ip 固定IP地址 <server> 虛擬機的名稱或者ID

16.interface-detach

    功能:虛擬機卸載網卡
    用法: nova interface-detach <server> <port_id>
    參數: <server> 虛擬機的名稱或者ID port_id 端口ID

17.interface-list

    功能:掛載在某個虛擬機上的全部網卡列表
    用法: nova interface-list <server>
    參數: <server> 虛擬機的名稱或者ID

18.network-associate-host

    功能:將網絡分配給某個節點
    用法: nova network-associate-host <network> <host>
    參數: <network> 網絡ID <host> 節點名稱

19.network-associate-project

    功能:將網絡分配給當前租戶
    用法: nova network-associate-project <network>
    參數: <network> 網絡ID

20.network-create

    功能:建立網絡
    用法: nova network-create <network-label>
    參數: <network-label> 網絡標籤

21.nertwork-delete

    功能:建立網絡
    用法: nova network-delete <network>
    參數: <network> 網絡UUID

22.network-disassociate

    功能:將節點或者租戶從指定網絡中解除
    用法: nova network-disassociate [--host-only [<0|1>]] [--project-only [<0|1>]] <network>
    參數: <network> 網絡UUID

23.network-list

    功能:網絡資源列表
    用法: nova network-list
    參數: 無

24.network-show

    功能:網絡資源列表
    用法: nova network-show <network>
    參數: <network> 網絡的UUID

25.refresh-network

    功能:刷新網絡
    用法: nova refresh-network <network>
    參數: <network> 網絡的UUID

26.remove-fixed-ip

    功能:從虛擬機移除固定IP
    用法: nova remove-fixed-ip <server> <address>
    參數: <server> 虛擬機的名稱或者ID <address> IP絡地址

27.remove-secgroup

    功能:從虛擬機移除安全組
    用法: nova remove-fixed-ip <server> <secgroup>
    參數: <server> 虛擬機的名稱或者ID <secgroup> 安全組名稱

28.reset-network

    功能:重置虛擬機的網絡信息
    用法: nova reset-network <server>
    參數: <server> 虛擬機的名稱或者ID

29.secgroup-add-default-rule

    功能:給默認安全組添加規則
    用法: nova secgroup-add-default-rule <ip-proto> <from-port> <to-port> <cidr>
    參數: <ip-proto> ip協議,包括icmp、tcp、udp from-port 開始端口 to-port 結束端口 <cidr> IP CIDR範圍

30.secgroup-add-group-rule

    功能:給安全組添加源組規則
    用法: nova secgroup-add-group-rule <secgroup> <source-group> <ip-proto> <from-port> <to-port>
    參數: secgroup安全組名稱或者ID source-group 源組名稱或者ID ip-proto ip協議 from-port 開始端口 to-port 結束端口

31.secgroup-add-rule

    功能:給安全組添加規則
    用法: nova secgroup-add-rule <secgroup> <ip-proto> <from-port> <to-port> <cidr>
    參數: secgroup安全組名稱或者ID  ip-proto ip協議 from-port 開始端口 to-port 結束 <cidr> IP CIDR範圍

32.secgroup-create

    功能:建立安全組
    用法: nova secgroup-create <name> <description>
    參數: name 安全組名稱 description 安全組描述

33.secgroup-delete

    功能:刪除安全組
    用法: nova secgroup-delete <name>
    參數: name 安全組名稱或者ID

32.secgroup-delete-default-rule

    功能:給默認安全組刪除規則
    用法: nova secgroup-delete-default-rule <ip-proto> <from-port> <to-port> <cidr>
    參數: <ip-proto> ip協議,包括icmp、tcp、udp from-port 開始端口 to-port 結束端口 <cidr> IP CIDR範圍

33.secgroup-delete-group-rule

    功能:給安全組刪除源組規則
    用法: nova secgroup-delete-group-rule <secgroup> <source-group> <ip-proto> <from-port> <to-port>
        參數: secgroup安全組名稱或者ID source-group 源組名稱或者ID ip-proto ip協議 from-port 開始端口 to-port 結束端口

34.secgroup-delete-rule

    功能:給安全組刪除規則
    用法: nova secgroup-delete-rule <secgroup> <ip-proto> <from-port> <to-port> <cidr>
    參數: secgroup安全組名稱或者ID  ip-proto ip協議 from-port 開始端口 to-port 結束 <cidr> IP CIDR範圍

35.secgroup-list

    功能:列舉當前租戶安全組規則
    用法: nova secgroup-list [--all-tenants [<0|1>]]
    參數: [--all-tenants [<0|1>] 是否顯示全部租戶的安全組

36.secgroup-list-default-rules

    功能:列舉全部租戶默認安全組規則
    用法: nova secgroup-default-rules
    參數: 無

37.secgroup-list-rules

    功能:列舉指定安全組規則
    用法: nova secgroup-list-rules
    參數: 無

38.secgroup-update

    功能:更新指定的安全組
    用法: nova secgroup-update <secgroup> <name> <description>
    參數: secgroup 安全組名稱或者ID name 新名稱 description 新描述

39.tenant-network-create

    功能:爲租戶建立網絡
    用法: nova tenant-network-create <network-label> <cidr>
    參數: network-label 網絡名稱 cidr IP地址段

40.tenant-network-delete

    功能:爲租戶刪除網絡
    用法: nova tenant-network-delete <network_id>
    參數: network_id 網絡ID

41.tenant-network-list

    功能:顯示租戶網絡列表
    用法: nova tenant-network-list
    參數: 無

42.tenant-network-show

    功能:顯示租戶網絡詳細信息
    用法: nova tenant-network-show <network_id>
    參數: network_id 網絡ID

    今天的講解就到這裏,主要針對nova有關網絡的操做,下次咱們將重點講解nova最爲核心的計算資源的相關操做,我將會分幾個小模塊進行講解和分析。感謝你們關注。

相關文章
相關標籤/搜索