vpc相關功能點:
| 模塊 | 功能點 | 描述 | 備注 |
|---|---|---|---|
| VPC | 創建vpc網絡 | 創建vpc網絡,指定vpc網絡名稱 | |
| 修改vpc網絡 | 修改vpc網絡名稱 | ||
| 刪除vpc網絡 | 刪除vpc網絡 |
vpc相關命令:
net-create Create a network for a given tenant. net-delete Delete a given network. net-external-list List external networks that belong to a given tenant. net-ip-availability-list List IP usage of networks net-ip-availability-show Show IP usage of specific network net-list List networks that belong to a given tenant. net-list-on-dhcp-agent List the networks on a DHCP agent. net-show Show information of a given network. net-update Update network's information.
net-create子命令屬性:
|
參數
|
描述
|
|---|---|
|
參數
|
描述
|
| NAME | 設置名稱 |
| --tenant-id | 指定租戶 |
| --admin-state-down | 管理狀態 |
| --shared | 設置是否為共享網絡(管理員) |
| --provider:network_type | 設置網絡類型 |
| --provider:physical_network | 實現虛擬網絡的物理網絡的名稱 |
| --provider:segmentation_id | 虛擬網絡id(VLAN ID / VNI) |
| --vlan-transparent | 創建透明模式的VLAN網絡 |
| --description | 添加描述信息 |
| --qos-policy | 添加qos規則 |
| --availability-zone-hint | 設置可用域 |
示例
創建一個vpc網絡:
命令語法:neutron net-create VPC_NAME --tenant-id <項目ID> --admin-state-up <up/down> --provider:network_type <虛擬網絡類型> --provider:segmentation_id <虛擬vlan ID> --availability-zone-hint <可用域>
--description "描述信息"
[root@10-0-192-18 ~]# neutron net-create ltwtest --tenant-id 73c538f5e43c4ac98ee01482f371539c --admin-state-up --provider:network_type vxlan --provider:segmentation_id 1009 --availability-zone-hint nova --description "This is a neutron-vpc create test." Created a new network: +---------------------------+--------------------------------------+ | Field | Value | +---------------------------+--------------------------------------+ | admin_state_up | True | | availability_zone_hints | nova | | availability_zones | | | created_at | 2017-05-09T03:20:51Z | | description | This is a neutron-vpc create test. | | id | fe054163-d056-4b8f-8c32-0b39c884fb8c | | ipv4_address_scope | | | ipv6_address_scope | | | mtu | 1450 | | name | ltwtest | | port_security_enabled | True | | project_id | 73c538f5e43c4ac98ee01482f371539c | | provider:network_type | vxlan | | provider:physical_network | | | provider:segmentation_id | 1009 | | qos_policy_id | | | revision_number | 3 | | router:external | False | | shared | False | | status | ACTIVE | | subnets | | | tags | | | tenant_id | 73c538f5e43c4ac98ee01482f371539c | | updated_at | 2017-05-09T03:20:51Z | +---------------------------+--------------------------------------+
net-update子命令屬性:
|
參數
|
描述
|
|---|---|
| --name | 更新網絡的名稱 |
| --description | 更新描述信息 |
| --qos-policy | 添加或更改qos規則 |
| --no-qos-policy | 刪除qos規則 |
示例:更改vpc網絡名稱
命令語法:neutron net-update <vpc_id> --name <update_name> --description '描述信息'
[root@10-0-192-18 ~]# neutron net-update fe054163-d056-4b8f-8c32-0b39c884fb8c --name testltw --description 'update' Updated network: fe054163-d056-4b8f-8c32-0b39c884fb8c
示例:刪除vpc網絡(刪除一個或多個vpc網絡):
命令語法:neutron net-delete <VPC_ID(s) or name(s)>
[root@10-0-192-18 ~]# neutron net-delete c8e4f509-4240-4c08-85dc-a5c6e677c4d8 Deleted network(s): c8e4f509-4240-4c08-85dc-a5c6e677c4d8
