发布于2020-04-04 19:16 阅读(2237) 评论(0) 点赞(28) 收藏(0)
- Pool 提供的方法:
-
- delete_all_pools
- delete_persistence_record
- delete_pool
- get_action_on_service_down
- get_active_member_count
- get_aggregate_dynamic_ratio
- get_all_statistics
- get_allow_nat_state
- get_allow_snat_state
- get_client_ip_tos
- get_client_link_qos
- get_gateway_failsafe_unit_id
- get_lb_method
- get_list
- get_member
- get_minimum_active_member
- get_minimum_up_member
- get_minimum_up_member_action
- get_minimum_up_member_enabled_state
- get_monitor_association
- get_monitor_instance
- get_object_status
- get_persistence_record
- get_server_ip_tos
- get_server_link_qos
- get_simple_timeout
- get_slow_ramp_time
- get_statistics
- get_version
- name
- remove_member
- remove_monitor_association
- reset_statistics
- set_action_on_service_down
- set_allow_nat_state
- set_allow_snat_state
- set_client_ip_tos
- set_client_link_qos
- set_gateway_failsafe_unit_id
- set_lb_method
- set_minimum_active_member
- set_minimum_up_member
- set_minimum_up_member_action
- set_minimum_up_member_enabled_state
- set_monitor_association
- set_server_ip_tos
- set_server_link_qos
- set_simple_timeout
- set_slow_ramp_time
- suds
- typefactory
-
-
-
-
- Pool => {
- get_list => 0,
- get_member => 'pool_names',
- get_object_status => 'pool_names',
- get_statistics => 'pool_names',
- get_all_statistics => 'pool_names',
- get_member_object_status=> {pool_names => 1, members => 1}
- },
-
- import pycontrol.pycontrol as pc
- import urllib3
- import ssl
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
- ssl._create_default_https_context = ssl._create_unverified_context
- import requests
- requests.packages.urllib3.disable_warnings()
- print 'bbbbbbbbbbbbbb'
- c = pc.BIGIP(
- hostname='10.4.170.160',
- username='zjtlcb',
- password='12345678',
- fromurl=True,
- wsdls=['LocalLB.Pool'])
-
- p1 = c.LocalLB.Pool
- a= dir(p1)
- print dir(a)
- print type(a)
-
- for x in a:
- print x
-
-
-
- get_list :获取所有的pool
-
- import pycontrol.pycontrol as pc
- import urllib3
- import ssl
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
- ssl._create_default_https_context = ssl._create_unverified_context
- import requests
- requests.packages.urllib3.disable_warnings()
- print 'bbbbbbbbbbbbbb'
- c = pc.BIGIP(
- hostname='10.4.170.160',
- username='zjtlcb',
- password='12345678',
- fromurl=True,
- wsdls=['LocalLB.Pool'])
-
- p1 = c.LocalLB.Pool
-
- print p1.get_list()
-
-
- get_member:
-
- import pycontrol.pycontrol as pc
- import urllib3
- import ssl
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
- ssl._create_default_https_context = ssl._create_unverified_context
- import requests
- requests.packages.urllib3.disable_warnings()
- print 'bbbbbbbbbbbbbb'
- c = pc.BIGIP(
- hostname='10.4.170.160',
- username='zjtlcb',
- password='12345678',
- fromurl=True,
- wsdls=['LocalLB.Pool'])
-
- p1 = c.LocalLB.Pool
-
- print p1.get_member(pool_names=['test_12916_pool'])
-
-
- get_object_status:
-
- import pycontrol.pycontrol as pc
- import urllib3
- import ssl
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
- ssl._create_default_https_context = ssl._create_unverified_context
- import requests
- requests.packages.urllib3.disable_warnings()
- print 'bbbbbbbbbbbbbb'
- c = pc.BIGIP(
- hostname='10.4.170.160',
- username='zjtlcb',
- password='12345678',
- fromurl=True,
- wsdls=['LocalLB.Pool'])
-
- p1 = c.LocalLB.Pool
- print p1.get_object_status(pool_names=['test_12916_pool'])
-
-
-
- get_statistics:
-
- import pycontrol.pycontrol as pc
- import urllib3
- import ssl
- urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
- ssl._create_default_https_context = ssl._create_unverified_context
- import requests
- requests.packages.urllib3.disable_warnings()
- print 'bbbbbbbbbbbbbb'
- c = pc.BIGIP(
- hostname='10.4.170.160',
- username='zjtlcb',
- password='12345678',
- fromurl=True,
- wsdls=['LocalLB.Pool'])
-
- p1 = c.LocalLB.Pool
- print p1.get_statistics(pool_names=['test_12916_pool'])
-
-
- get_member_object_status:
-
- sub get_ltm_pool_member_status {
- my ($self, $pool, $member) = @_;
- return @{$self->_request(module => 'LocalLB', interface => 'Pool', method => 'get_member_object_status', data => {
- pool_names => [$pool],
- members => [$member],
- })}[0];
- }
原文链接:https://blog.csdn.net/zhaoyangjian724/article/details/105288397
作者:以拯救苍生己任
链接:https://www.pythonheidong.com/blog/article/305054/2a34ae67a2c8f01c3e28/
来源:python黑洞网
任何形式的转载都请注明出处,如有侵权 一经发现 必将追究其法律责任
昵称:
评论内容:(最多支持255个字符)
---无人问津也好,技不如人也罢,你都要试着安静下来,去做自己该做的事,而不是让内心的烦躁、焦虑,坏掉你本来就不多的热情和定力
Copyright © 2018-2021 python黑洞网 All Rights Reserved 版权所有,并保留所有权利。 京ICP备18063182号-1
投诉与举报,广告合作请联系vgs_info@163.com或QQ3083709327
免责声明:网站文章均由用户上传,仅供读者学习交流使用,禁止用做商业用途。若文章涉及色情,反动,侵权等违法信息,请向我们举报,一经核实我们会立即删除!