感谢朋友支持本博客。欢迎共同探讨交流。因为能力和时间有限。错误之处在所难免,欢迎指正!

假设转载,请保留作者信息。

博客地址:http://blog.csdn.net/qq_21398167

原博文地址:http://blog.csdn.net/qq_21398167/article/details/46620261

Networks

Network interface.

class novaclient.v2.networks.Network(manager,info,
loaded=False)

Bases: novaclient.openstack.common.apiclient.base.Resource

A network.

Populate and bind to a manager.

Parameters:
  • manager – BaseManager object
  • info – dictionary representing resource attributes
  • loaded – prevent lazy-loading if set to True
HUMAN_ID = True

NAME_ATTR = 'label'

delete()

class novaclient.v2.networks.NetworkManager(api)

Bases: novaclient.base.ManagerWithFind

Manage Network resources.

add(network=None)

Associates the current project with a network. Network can be chosenautomatically or provided explicitly.

Parameters: network – The ID of the
Network
to associate (optional).
associate_host(network,host)

Associate a specific network with a host.

Parameters:
  • network – The ID of the
    Network
    .
  • host – The name of the host to associate the network with
associate_project(network)

Associate a specific network with a project.

The project is defined by the project authenticated against

Parameters: network – The ID of the
Network
.
create(**kwargs)

Create (allocate) a network. The following parameters areoptional except for label; cidr or cidr_v6 must be specified, too.

Parameters:
  • label – str
  • bridge – str
  • bridge_interface – str
  • cidr – str
  • cidr_v6 – str
  • dns1 – str
  • dns2 – str
  • fixed_cidr – str
  • gateway – str
  • gateway_v6 – str
  • multi_host – str
  • priority – str
  • project_id – str
  • vlan – int
  • vlan_start – int
  • vpn_start – int
  • mtu – int
  • enable_dhcp – int
  • dhcp_server – str
  • share_address – int
  • allowed_start – str
  • allowed_end – str
Return type:

object of Network

delete(network)

Delete a specific network.

Parameters: network – The ID of the
Network
to delete.
disassociate(network,disassociate_host=True,
disassociate_project=True)

Disassociate a specific network from project and/or host.

Parameters:
  • network – The ID of the
    Network
    .
  • disassociate_host – Whether to disassociate the host
  • disassociate_project – Whether to disassociate the project
get(network)

Get a specific network.

Parameters: network – The ID of the
Network
to get.
Return type: Network
list()

Get a list of all networks.

Return type: list of Network.
resource_class

alias of Network

最新文章

  1. docker创建私有仓库
  2. Spring Boot 框架@Temporal(TemporalType.DATE)
  3. C# has three timers
  4. Hibernate实现向数据库插入一条数据全过程(Study By Example)
  5. [网络技术][转]PPTP连接过程
  6. C++学习24 虚析构函数
  7. Oracle 将不同列的值拼接成一个 字符串
  8. 使用Github遇到的问题及解决办法
  9. 通用超级强大的基于Oracle数据库的代码生成器
  10. HUD --- 3635
  11. Chrome不支持本地Ajax请求解决?
  12. Unity3d之将terrain转化成mesh
  13. 新手数据比赛中数据处理方法小结(python)
  14. [Swift]LeetCode31. 下一个排列 | Next Permutation
  15. 在桌面右键创建html,css,js文件
  16. 转载aaa
  17. [No000013D].Net 项目代码风格参考
  18. nginx 服务器常见配置以及负载均衡
  19. zoj Calculate the Function
  20. Socket 传一幅图片给另一个终端

热门文章

  1. Oracle_备份整库
  2. lnmp 安装FTP服务 并配置FTP用户
  3. NSLayoutConstraints加动画来改变约束
  4. PL/SQL之基础篇
  5. 171129-workaround on ubuntu-seting up piston for steem
  6. AI:恐怖谷理论的陷阱
  7. 安卓Queue的使用
  8. 【技术累积】【点】【sql】【17】了解索引
  9. 【sqli-labs】 less31 GET- Blind -Impidence mismatch -Having a WAF in front of web application (GET型基于盲注的带有WAF注入)
  10. gitlab变更邮箱后发送邮件报SSLError错误