update Code/ddns.py.
This commit is contained in:
parent
c970f36c93
commit
0c66cf9c0c
@ -18,8 +18,7 @@ from aliyunsdkcore.client import AcsClient
|
||||
from aliyunsdkcore.acs_exception.exceptions import ClientException
|
||||
from aliyunsdkcore.acs_exception.exceptions import ServerException
|
||||
from aliyunsdkalidns.request.v20150109.DescribeDomainRecordsRequest import DescribeDomainRecordsRequest
|
||||
from aliyunsdkalidns.request.v20150109.DeleteDomainRecordRequest import DeleteDomainRecordRequest
|
||||
from aliyunsdkalidns.request.v20150109.AddDomainRecordRequest import AddDomainRecordRequest
|
||||
from aliyunsdkalidns.request.v20150109.UpdateDomainRecordRequest import UpdateDomainRecordRequest
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
|
||||
@ -99,7 +98,7 @@ if ipv4 == 'true':#Judging whether IPV4 DDNS is open
|
||||
updv4 = UpdateDomainRecordRequest()#Start Update Domain Records
|
||||
updv4.set_accept_format('json')
|
||||
|
||||
updv4.RecordId(recordidv4)
|
||||
updv4.set_RecordId(recordidv4)
|
||||
updv4.set_Value(v4.text)#Set Domain Record From Machine's Internet IPV4 Address
|
||||
updv4.set_Type("A")#Set Domain Record Type
|
||||
updv4.set_RR(rr)#Set Domain Record RR
|
||||
@ -159,7 +158,7 @@ if ipv6 == "true":#Judging whether IPV6 DDNS is open
|
||||
updv6 = UpdateDomainRecordRequest()#Start Update Domain Records
|
||||
updv6.set_accept_format('json')
|
||||
|
||||
updv6.RecordId(recordidv6)
|
||||
updv6.set_RecordId(recordidv6)
|
||||
updv6.set_Value(v6.text)#Set Domain Record From Machine's Internet IPV6 Address
|
||||
updv6.set_Type("AAAA")#Set Domain Record Type
|
||||
updv6.set_RR(rr)#Set Domain Record RR
|
||||
|
Reference in New Issue
Block a user