Module gslb :: Class GslbDnsProxy
[hide private]
[frames] | no frames]

Class GslbDnsProxy

source code

   object --+    
            |    
base.AxObject --+
                |
               GslbDnsProxy


Implementation of the aXAPI gslb.dns_proxy.* method to 
manage the GSLB DNS proxy configuration as getAll/create/delete/update 

Usage:
    # DNS proxy with parameters:
    # name                        (required) GSLB DNS proxy name
    # ip_address                  (required) IP address of the dns proxy
    # status                      status, enabled(1) or disabled(0)
    # ha_group                    HA group ID (1 - 31)
    # ha_group_dynamic_weight     Dynamic weight of the DNS proxy in the HA group
    # vport_list                  Virtual port list of the GSLB DNS proxy
    #     port_number             Virtual port number (1 - 65535)
    #     service_group           service group(name) of this virtual port
    #     status                  enabled(1) or disabled(0)
    #     connection_limit        connection limit (1 - 8000000)
    #     over_connection_limit_action     over connection limit action, drop(0), reset (1)
    #     source_nat_pool source  NAT pool name
    #     aflex                   aFlex(name) of this virtual port
    #     udp_template            UDP template (name) of this virtual port
    
    # Example: 
    # create a GSLB DNS proxy configuration as:  
    !
    slb virtual-server my_dns_proxy 22.2.2.1
       stats-data-disable
       port 55  udp
          name _22.2.2.1_UDP_55
          disable
          gslb-enable
          service-group http
          no def-selection-if-pref-failed
          stats-data-disable
       port 80  udp
          name _22.2.2.1_UDP_80
          gslb-enable
          service-group http
          no def-selection-if-pref-failed
          stats-data-disable
    !
    #  Above service group 'http' has been created before
    dns_proxy = GslbDnsProxy(name="my_dns_proxy", ip_address="22.2.2.1")
    dns_proxy.vport_list = [{"port_number": 55, "service_group": "http", "status": AxAPI.STATUS_DISABLED}, {"port_number": 80, "service_group": "http", "status": AxAPI.STATUS_ENABLED}]
    dns_proxy.create()

    # retrieve all GSLB DNS proxy configuration:
    d_proxies = GslbDnsProxy.getAll()
    for e in d_proxies:
        print e
        e.dump()

Instance Methods [hide private]
 
create(self)
method: gslb.dns_proxy.create Create the GSLB DNS proxy.
source code
 
delete(self)
method: gslb.dns_proxy.delete Delete the GSLB DNS proxy.
source code
 
update(self)
method: gslb.dns_proxy.update Update the GSLB DNS proxy.
source code

Inherited from base.AxObject: __getattr__, __getitem__, __init__, __repr__, __setattr__, __setitem__, __str__, dump, get, getInfo, getObjectDict, getRequestPostDataJson, getRequestPostDataXml

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __subclasshook__

Static Methods [hide private]
 
getAll()
method : gslb.dns_proxy.getAll Returns a list of GSLB DNS-proxy in GslbDnsProxy instance.
source code
 
searchByName(name)
method: gslb.dns_proxy.search Search the GSLB DNS-proxy by given name.
source code
Class Variables [hide private]
  __display__ = ['name', 'ip_address', 'status']
  __obj_name__ = 'gslb_vserver'
  __xml_convrt__ = {'gslb_vserver_list': 'gslb_vserver', 'vport_...

Inherited from base.AxObject: __obj_readonly__

Properties [hide private]

Inherited from object: __class__

Class Variable Details [hide private]

__xml_convrt__

Value:
{'gslb_vserver_list': 'gslb_vserver', 'vport_list': 'vport'}