Skip to content

Instantly share code, notes, and snippets.

@rosskukulinski
Created September 4, 2016 19:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rosskukulinski/a2eabd90197f922a023d22f651e0ff50 to your computer and use it in GitHub Desktop.
Save rosskukulinski/a2eabd90197f922a023d22f651e0ff50 to your computer and use it in GitHub Desktop.
Rackspace delegate subdomain DNS
#!/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