Neutron/LBaaS/CLI
< Neutron | LBaaS(重定向自 Quantum/LBaaS/CLI)
目录
- 1 范围
- 2 实施细节
- 3 命令规范
- 3.1 lb-healthmonitor-create
- 3.2 lb-healthmonitor-delete
- 3.3 lb-healthmonitor-list
- 3.4 lb-healthmonitor-show
- 3.5 lb-healthmonitor-update
- 3.6 lb-healthmonitor-associate
- 3.7 lb-healthmonitor-disassociate
- 3.8 lb-member-create
- 3.9 lb-member-delete
- 3.10 lb-member-list
- 3.11 lb-member-show
- 3.12 lb-member-update
- 3.13 lb-pool-create
- 3.14 lb-pool-delete
- 3.15 lb-pool-list
- 3.16 lb-pool-show
- 3.17 lb-pool-stats
- 3.18 lb-pool-update
- 3.19 lb-vip-create
- 3.20 lb-vip-delete
- 3.21 lb-vip-list
- 3.22 lb-vip-show
- 3.23 lb-vip-update
范围
本文档描述了将在 python-quantumclient 中引入以支持 LBaaS 高级服务的命令。
实施细节
所有 LBaaS 命令都具有前缀 lb-,以避免歧义。该命令集对应于 Quantum/LBaaS/API_1.0
lb-healthmonitor-create Create a health monitor lb-healthmonitor-delete Delete a given health monitor lb-healthmonitor-list List health monitors that belong to a given tenant lb-healthmonitor-show Show information of a given health monitor lb-healthmonitor-update Update health monitor's information lb-healthmonitor-associate Associate a health monitor with a pool lb-healthmonitor-disassociate Disassociate a health monitor with a pool lb-member-create Create a member lb-member-delete Delete a given member lb-member-list List members that belong to a given tenant lb-member-show Show information of a given member lb-member-update Update member's information lb-pool-create Create a pool lb-pool-delete Delete a given pool lb-pool-list List pools that belong to a given tenant lb-pool-show Show information of a given pool lb-pool-update Update pool's information lb-pool-stats Retrieve traffic statistics for pool lb-vip-create Create a vip lb-vip-delete Delete a given vip lb-vip-list List vips that belong to a given tenant lb-vip-show Show information of a given vip lb-vip-update Update vip's information
命令规范
lb-healthmonitor-create
创建一个新的健康监控对象。
lb-healthmonitor-create --type <type> --delay <delay> --max-retries <max retries> --timeout <timeout> [--admin-state-down] [--http-method <http method>] [--url-path <url path>] [--expected-codes <expected codes>] [--tenant-id <tenant id>]
- type: 一种预定义的健康监控类型
- delay:成员的常规连接之间的最小时间(秒)。
- timeout:监控等待建立连接之前的最大秒数,超时后将停止等待。该值必须小于 delay 值。
- max-retries: 在将成员状态更改为 INACTIVE 之前允许的最大连接失败次数。必须是 1 到 10 之间的数字。
- http-method: 监控器类型为 HTTP 时请求使用的 HTTP 方法。如果未指定此属性,则默认值为“GET”。
- url-path: 监控器用于测试成员健康的 HTTP 请求中使用的 HTTP 路径。此字符串必须以 /(正斜杠)开头。如果未指定,则默认值为“/”。
- expected-codes: 这些是成员在响应中返回的预期 HTTP 状态代码列表,以声明其健康状态。此属性可以包含一个值,也可以包含用逗号分隔的值列表,或者一个值范围(例如“200-299”)。如果未指定此属性,则默认值为“200”。
- tenant-id: 拥有健康监控的租户 ID
lb-healthmonitor-delete
删除给定的健康监控对象。
lb-healthmonitor-delete <healthmonitor-id>
lb-healthmonitor-list
显示可用于租户的健康监控对象列表。
lb-healthmonitor-list
lb-healthmonitor-show
显示给定健康监控对象的信息。
lb-healthmonitor-show <healthmonitor-id>
lb-healthmonitor-update
更新给定健康监控对象的信息。
lb-healthmonitor-update <healthmonitor-id> [--admin-state-down] [--delay <delay>] [--max-retries <max retries>] [--timeout <timeout>] [--name <name>] [--http-method <http method>] [--url-path <url path>] [--expected-codes <expected codes>]
lb-healthmonitor-associate
将健康监控与池关联。
lb-healthmonitor-associate <healthmonitor-id> <pool-id>
lb-healthmonitor-disassociate
将健康监控与池取消关联。
lb-healthmonitor-disassociate <healthmonitor-id> <pool-id>
lb-member-create
创建一个成员
lb-member-create --address <IP> --protocol-port <tcp port> [--weight <weight>] [--admin-state-down] [--tenant-id <tenant id>] <pool-id>
- address: 池成员在池的网络上的 IP 地址。
- protocol-port: 池成员侦听请求或连接的端口。
- weight: 池中成员的权重。
- pool-id: 将成员添加到的池。
- tenant-id: 拥有成员的租户 ID
lb-member-delete
删除给定的成员
lb-member-delete <member-id>
lb-member-list
列出属于给定租户的成员
lb-member-list
lb-member-show
显示给定成员的信息
lb-member-show <member-id>
lb-member-update
更新成员的信息
lb-member-update <member-id> [--admin-state-down] [--pool-id <pool id>] [--weight <weight>] [--admin-state <UP|DOWN>]
lb-pool-create
创建一个池
lb-pool-create --subnet-id <subnet-id> --lb-method <lb-method> --protocol <protocol> --name <name> [--admin-state-down] [--description <description>] [--tenant-id <tenant id>] [-- [--health_monitors {<id>}]]
- name: 池的名称
- subnet_id: 池的成员将位于的网络上的子网。只有位于此子网上的成员才能添加到池中。
- lb_method: 用于在池的成员之间分配负载的算法。
- protocol: 池成员使用的协议
- description: 池的人性化描述
- tenant-id: 拥有池的租户 ID
该操作还可以将健康监控与创建的池关联,为此需要在位置参数 --health_monitors 中指定监控器 ID 列表。
lb-pool-delete
删除给定的池
lb-pool-delete <pool-id>
lb-pool-list
列出属于给定租户的池
lb-pool-list
lb-pool-show
显示给定池的信息
lb-pool-show <pool-id>
lb-pool-stats
检索给定池的流量统计信息
lb-pool-stats <pool-id>
lb-pool-update
更新池的信息
lb-pool-update <pool-id> [--admin-state-down] [--lb-method <lb-method>] [--description <description>] [--name <name>]
lb-vip-create
创建一个 vip
lb-vip-create --subnet-id <subnet-id> --protocol <protocol> --protocol-port <tcp port> --name <name> [--address <address>] [--admin-state-down] [--connection-limit <connection limit>] [--description <description>] [--tenant-id <tenant id>] <pool-id> [--session-persistence type=dict type=<type>,[cookie_name=<name>]]
- subnet_id: 分配 vip 地址的子网。租户只能在策略授权的子网上创建 vip。
- protocol: vip 地址的协议。
- protocol-port: 用于侦听与 vip 地址关联的客户端流量的端口。
- address: vip 的 IP 地址
- connection-limit: vip 允许的最大每秒连接数。
- description: vip 的人性化描述
- pool_id: 包含负载均衡的真实服务器的池的 ID。
- tenant-id: 拥有 vip 的租户 ID
- session-persistence: 包含会话持久性参数的字典,例如:
- type: 应用于流量的会话持久性类型。
- cookie-name: 基于 cookie 的会话持久性中 cookie 的名称。
lb-vip-delete
删除给定的 vip
lb-vip-delete <vip-id>
lb-vip-list
列出属于给定租户的 vip
lb-vip-list
lb-vip-show
显示给定 vip 的信息
lb-vip-show <vip-id>
lb-vip-update
更新 vip 的信息
lb-vip-update <vip-id> [--address <address>] [--admin-state-down] [--connection-limit <connection limit>] [--description <description>] [--pool-id <pool-id>] [--name <name>] [--session-persistence-disable] [--session-persistence type=dict type=<type>,[cookie_name=<name>]]