Last active
          December 9, 2015 21:28 
        
      - 
      
- 
        Save underscorephil/4330747 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or 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
    
  
  
    
  | import SoftLayer | |
| from pprint import pprint as pp | |
| apiUsername = '' | |
| apiKey = '' | |
| client = SoftLayer.Client(username=apiUsername, api_key=apiKey) | |
| records = [ | |
| { | |
| 'host': '@', | |
| 'data': 'ns1.philexampleone.com', | |
| 'responsiblePerson': 'admin.philexampleone.com', | |
| 'expire': 604800, | |
| 'referesh': 3600, | |
| 'retry': 300, | |
| 'minimum': 3600, | |
| 'type': 'SOA' | |
| }, | |
| { | |
| 'data': '127.0.0.1', | |
| 'host': '@', | |
| 'type': 'a' | |
| } | |
| ] | |
| domain = { | |
| 'name': 'philexampleone.com', | |
| 'resourceRecords': records | |
| } | |
| result = client['Dns_Domain'].createObject(domain) | |
| pp(result) | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
misspell: refresh https://gist.github.com/underscorephil/4330747#file-create-zone-with-soa-py-L15