Sha256: 7d389f5fc29305038ede5d0274d3c6f1f77214ec1feab91212047aad75d599b9
Contents?: true
Size: 1.12 KB
Versions: 21
Compression:
Stored size: 1.12 KB
Contents
def test connection = Fog::DNS::Google.new puts 'Create a Zone...' puts '----------------' zone = connection.zones.create(name: 'mytestdomain', domain: 'example.org.', description: 'This is my test domain') puts 'List all Zones...' puts '-----------------' connection.zones.all puts 'Get the Zone...' puts '---------------' zone = connection.zones.get(zone.id) puts 'Create an "A" Record...' puts '-----------------------' record = zone.records.create(name: 'test.example.org.', type: 'A', ttl: 3600, rrdatas: ['192.168.1.1']) puts 'Get the Zone Resource Record Sets...' puts '------------------------------------' zone.records puts 'Get the Record...' puts '-----------------' record = connection.records(zone: zone).get(name: 'test.example.org.', type: 'A') puts 'Modify the "A" Record...' puts '------------------------' record.modify(ttl: 2600) puts 'Delete the "A" Record...' puts '------------------------' record.destroy puts 'Get the Zone Changes...' puts '-----------------------' zone.changes puts 'Delete the Zone...' puts '------------------' zone.destroy end
Version data entries
21 entries across 19 versions & 5 rubygems