Class GslbSite
source code
object --+
|
base.AxObject --+
|
GslbSite
Implementation of the aXAPI gslb.site.* method to
manage the GSLB site configuration as getAll/create/delete/update
Usage:
# Site with parameters:
# name (required) Site name
# weight weight
# template name of GSLB template
# status site status is enabled(1) or disabled(0)
# bandwidth_cost tag of bandwidth cost
# limit bandwidth limit of bandwidth cost
# threshold threshold of bandwidth cost
# active_rrt tag of active RRT
# aging_time aging time of active RRT
# bind_geoloc bind geographic of active RRT
# overlap overlap of active RRT
# limit limit of active RRT
# mask_len mask length of active RRT
# range_factor range factor of active RRT
# smooth_factor smooth factor of active RRT
# ip_server_list tag of IP server list
# name name of IP server
# ip_addr IP address of SLB device
# slb_device_list tag of SLB device list
# name SLB device name
# ip_addr IP address of SLB device
# admin_preference admin preference option
# max_client max num of clients
# gateway gateway
# vip_server_list tag of virtual server list
# name Name of virtual server
# Example:
# create a GSLB site configuration as:
!
gslb site site1
bw-cost limit 100 threshold 10
active-rtt mask /0
slb-dev ABC 2.4.6.9
admin-preference 10
slb-dev ABD 2.4.6.10
admin-preference 10
!
#
site1 = GslbSite(name="site1")
site1.weigth = 5
site1.status = AxAPI.STATUS_ENABLED
site1.bandwidth_cost["status"]= AxAPI.STATUS_ENABLED
site1.bandwidth_cost["limit"] = 100
site1.bandwidth_cost["threshold"] = 10
site1.active_rrt["aging_time"] = 10
site1.active_rrt["bind_geoloc"] = 0
site1.active_rrt["ignore_count"] = 5
site1.active_rrt["limit"] = 16383
site1.active_rrt["mask_len"] = 0
site1.slb_device_list = [{"name":"ABC", "ip_addr":"2.4.6.9", "admin_preference":10, "max_client":32768, "gateway":"0.0.0.0", "passive_rtt_timer":3, "protocol_aging_fast":1, "protocol_aging_time":0, "protocol_compatible":0}, {"name":"ABD", "ip_addr":"2.4.6.10", "admin_preference":10, "max_client":32768, "gateway":"0.0.0.0", "passive_rtt_timer":3, "protocol_aging_fast":1, "protocol_aging_time":0, "protocol_compatible":0}]
site1.create()
|
|
__init__(self,
**params)
x.__init__(...) initializes x; see help(type(x)) for signature |
source code
|
|
|
|
create(self)
method: gslb.site.create Create the GSLB site. |
source code
|
|
|
|
delete(self)
method: gslb.site.delete Delete the GSLB site. |
source code
|
|
|
|
update(self)
method: gslb.site.update Update the GSLB site. |
source code
|
|
|
Inherited from base.AxObject:
__getattr__,
__getitem__,
__repr__,
__setattr__,
__setitem__,
__str__,
dump,
get,
getInfo,
getObjectDict,
getRequestPostDataJson,
getRequestPostDataXml
Inherited from object:
__delattr__,
__format__,
__getattribute__,
__hash__,
__new__,
__reduce__,
__reduce_ex__,
__sizeof__,
__subclasshook__
|
|
|
getAll()
method : gslb.site.getAll Returns a list of GSLB sites in GslbSite
instance. |
source code
|
|
|
|
searchByName(name)
method: gslb.site.search Search the GSLB site by given name. |
source code
|
|
|
Inherited from object:
__class__
|
|
x.__init__(...) initializes x; see help(type(x)) for signature
- Overrides:
object.__init__
- (inherited documentation)
|
__xml_convrt__
- Value:
{'gslb_site_list': 'gslb_site',
'ip_server_list': 'ip_server',
'slb_device_list': 'slb_device',
'vip_server_list': 'vip_server'}
|
|