【问题标题】:How to associate floating IP to a port using openstacksdk?如何使用 openstacksdk 将浮动 IP 关联到端口?
【发布时间】:2020-09-17 17:33:01
【问题描述】:

我正在使用 openstacksdk 编写 openstack 操作。我参考了this link。我必须使用 openstacksdk 实现以下目标:

#openstack floating ip set --port <port ID> <FIP>

但我无法找到 openstasksdk 中描述的任何功能。

【问题讨论】:

  • @James Z :感谢您提高可读性。

标签: openstacksdk


【解决方案1】:

我没有为此找到任何直接的 sdk 库。但我使用以下方法实现了:

create_stack(name, tags=None, template_file=None, template_url=None, template_object=None, files=None, rollback=True, wait=False, timeout=3600, environment_files=None, **parameters)

and HOT:

heat_template_version: 2013-05-23
parameters:
  ingress_fip_id:
    type: string
    description: Floating ip address ID to associate it with ingress port.
  ingress_port_id:
    type: string
    description: ingress port ID.

resources:
  associate_fip:
    type: OS::Neutron::FloatingIPAssociation
    properties:
      floatingip_id: { get_param: ingress_fip_id }
      port_id: { get_param: ingress_port_id }

【讨论】:

    猜你喜欢
    • 2018-12-29
    • 2018-12-24
    • 2023-03-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-17
    • 1970-01-01
    • 2014-10-14
    相关资源
    最近更新 更多