程序员最近都爱上了这个网站  程序员们快来瞅瞅吧!  it98k网:it98k.com

本站消息

站长简介/公众号

  出租广告位,需要合作请联系站长

+关注
已关注

分类  

暂无分类

标签  

暂无标签

日期归档  

暂无数据

pool 提供的方法

发布于2020-04-04 19:16     阅读(2237)     评论(0)     点赞(28)     收藏(0)


  1. Pool 提供的方法:
  2. delete_all_pools
  3. delete_persistence_record
  4. delete_pool
  5. get_action_on_service_down
  6. get_active_member_count
  7. get_aggregate_dynamic_ratio
  8. get_all_statistics
  9. get_allow_nat_state
  10. get_allow_snat_state
  11. get_client_ip_tos
  12. get_client_link_qos
  13. get_gateway_failsafe_unit_id
  14. get_lb_method
  15. get_list
  16. get_member
  17. get_minimum_active_member
  18. get_minimum_up_member
  19. get_minimum_up_member_action
  20. get_minimum_up_member_enabled_state
  21. get_monitor_association
  22. get_monitor_instance
  23. get_object_status
  24. get_persistence_record
  25. get_server_ip_tos
  26. get_server_link_qos
  27. get_simple_timeout
  28. get_slow_ramp_time
  29. get_statistics
  30. get_version
  31. name
  32. remove_member
  33. remove_monitor_association
  34. reset_statistics
  35. set_action_on_service_down
  36. set_allow_nat_state
  37. set_allow_snat_state
  38. set_client_ip_tos
  39. set_client_link_qos
  40. set_gateway_failsafe_unit_id
  41. set_lb_method
  42. set_minimum_active_member
  43. set_minimum_up_member
  44. set_minimum_up_member_action
  45. set_minimum_up_member_enabled_state
  46. set_monitor_association
  47. set_server_ip_tos
  48. set_server_link_qos
  49. set_simple_timeout
  50. set_slow_ramp_time
  51. suds
  52. typefactory
  53. Pool => {
  54. get_list => 0,
  55. get_member => 'pool_names',
  56. get_object_status => 'pool_names',
  57. get_statistics => 'pool_names',
  58. get_all_statistics => 'pool_names',
  59. get_member_object_status=> {pool_names => 1, members => 1}
  60. },
  61. import pycontrol.pycontrol as pc
  62. import urllib3
  63. import ssl
  64. urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  65. ssl._create_default_https_context = ssl._create_unverified_context
  66. import requests
  67. requests.packages.urllib3.disable_warnings()
  68. print 'bbbbbbbbbbbbbb'
  69. c = pc.BIGIP(
  70. hostname='10.4.170.160',
  71. username='zjtlcb',
  72. password='12345678',
  73. fromurl=True,
  74. wsdls=['LocalLB.Pool'])
  75. p1 = c.LocalLB.Pool
  76. a= dir(p1)
  77. print dir(a)
  78. print type(a)
  79. for x in a:
  80. print x
  81. get_list :获取所有的pool
  82. import pycontrol.pycontrol as pc
  83. import urllib3
  84. import ssl
  85. urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  86. ssl._create_default_https_context = ssl._create_unverified_context
  87. import requests
  88. requests.packages.urllib3.disable_warnings()
  89. print 'bbbbbbbbbbbbbb'
  90. c = pc.BIGIP(
  91. hostname='10.4.170.160',
  92. username='zjtlcb',
  93. password='12345678',
  94. fromurl=True,
  95. wsdls=['LocalLB.Pool'])
  96. p1 = c.LocalLB.Pool
  97. print p1.get_list()
  98. get_member:
  99. import pycontrol.pycontrol as pc
  100. import urllib3
  101. import ssl
  102. urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  103. ssl._create_default_https_context = ssl._create_unverified_context
  104. import requests
  105. requests.packages.urllib3.disable_warnings()
  106. print 'bbbbbbbbbbbbbb'
  107. c = pc.BIGIP(
  108. hostname='10.4.170.160',
  109. username='zjtlcb',
  110. password='12345678',
  111. fromurl=True,
  112. wsdls=['LocalLB.Pool'])
  113. p1 = c.LocalLB.Pool
  114. print p1.get_member(pool_names=['test_12916_pool'])
  115. get_object_status:
  116. import pycontrol.pycontrol as pc
  117. import urllib3
  118. import ssl
  119. urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  120. ssl._create_default_https_context = ssl._create_unverified_context
  121. import requests
  122. requests.packages.urllib3.disable_warnings()
  123. print 'bbbbbbbbbbbbbb'
  124. c = pc.BIGIP(
  125. hostname='10.4.170.160',
  126. username='zjtlcb',
  127. password='12345678',
  128. fromurl=True,
  129. wsdls=['LocalLB.Pool'])
  130. p1 = c.LocalLB.Pool
  131. print p1.get_object_status(pool_names=['test_12916_pool'])
  132. get_statistics:
  133. import pycontrol.pycontrol as pc
  134. import urllib3
  135. import ssl
  136. urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
  137. ssl._create_default_https_context = ssl._create_unverified_context
  138. import requests
  139. requests.packages.urllib3.disable_warnings()
  140. print 'bbbbbbbbbbbbbb'
  141. c = pc.BIGIP(
  142. hostname='10.4.170.160',
  143. username='zjtlcb',
  144. password='12345678',
  145. fromurl=True,
  146. wsdls=['LocalLB.Pool'])
  147. p1 = c.LocalLB.Pool
  148. print p1.get_statistics(pool_names=['test_12916_pool'])
  149. get_member_object_status:
  150. sub get_ltm_pool_member_status {
  151. my ($self, $pool, $member) = @_;
  152. return @{$self->_request(module => 'LocalLB', interface => 'Pool', method => 'get_member_object_status', data => {
  153. pool_names => [$pool],
  154. members => [$member],
  155. })}[0];
  156. }

 

原文链接:https://blog.csdn.net/zhaoyangjian724/article/details/105288397



所属网站分类: 技术文章 > 博客

作者:以拯救苍生己任

链接:https://www.pythonheidong.com/blog/article/305054/2a34ae67a2c8f01c3e28/

来源:python黑洞网

任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任

28 0
收藏该文
已收藏

评论内容:(最多支持255个字符)