Created
September 4, 2016 19:18
-
-
Save rosskukulinski/a2eabd90197f922a023d22f651e0ff50 to your computer and use it in GitHub Desktop.
Rackspace delegate subdomain DNS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import pyrax | |
pyrax.set_setting("identity_type", "rackspace") | |
pyrax.set_default_region('DFW') | |
pyrax.set_credentials('XXX', 'YYY') | |
domain = pyrax.cloud_dns.find(name="yourdomain.com") | |
print domain | |
domain.add_record({ | |
'type': 'NS', | |
'name': 'aws.yourdomain.com', | |
'ttl': 600, | |
'data': 'zzz' | |
}) | |
domain.add_record({ | |
'type': 'NS', | |
'name': 'aws.yourdomain.com', | |
'ttl': 600, | |
'data': 'zzz2' | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment