Module slb_template :: Class TemplateSmtp
[hide private]
[frames] | no frames]

Class TemplateSmtp

source code

   object --+    
            |    
base.AxObject --+
                |
               TemplateSmtp


Implementation of the aXAPI slb.template.smtp.* method to 
manage the SLB SMTP template as getAll/create/delete/update 

Usage:
    # SMTP template with options:
    # name                     (required)
    # starttls                 STARTTLS, disabled(0), enforced(2) or optional(1)
    # EXPN                     SMTP command EXPN, enabled(0) or disabled(1)
    # TURN                     SMTP command TURN, enabled(0) or disabled(1)
    # VRFY                     SMTP command VRFY, enabled(0) or disabled(1)
    # server_domain            server domain
    # service_ready_message    service ready message
    # client_domain_switching_list   tag for the collection of client switchings
    #     client_domain              client domain
    #     service_group              service group name
    #     match_type                 match type, contains(0), starts with(1), ends with(2)
    
    # Example: create a smtp template like
    # !
    # slb template smtp my_smpt_temp1
    #    client-domain-switching contains domain1 service-group sg1
    # !
    smtp = TemplateSmtp(name="my_smpt_templ")
    smtp.client_domain_switching_list = [{"client_domain": "domain1", "service_group": "sg1", "match_type": 0}]
    smtp.create()
    # get all SMTP templates
    a_list = TemplateSmtp.getAll()
    for aSmtp in a_list:
        # use aSmtp here
        ...

Instance Methods [hide private]
 
create(self)
method: slb.template.smtp.create Create the SMTP template.
source code
 
delete(self)
method: slb.template.smtp.delete Delete the SMTP template.
source code
 
update(self)
method: slb.template.smtp.update Update the SMTP template.
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 : slb.template.smtp.getAll Returns a list of SMTP template in TemplateSmtp instance.
source code
 
searchByName(name)
method: slb.template.smtp.search Search the SMTP template by given name.
source code
Class Variables [hide private]
  __display__ = ['name']
  __obj_name__ = 'smtp_template'
  __xml_convrt__ = {'client_domain_switching_list': 'client_doma...

Inherited from base.AxObject: __obj_readonly__

Properties [hide private]

Inherited from object: __class__

Class Variable Details [hide private]

__xml_convrt__

Value:
{'client_domain_switching_list': 'client_domain_switching',
 'smtp_template_list': 'smtp_template'}